I want to allow certain characters to a string
For example I want

strA to contain either 'A' or 'B' or 'C' or 'D'

How do I do that, help would be greatly appreciated.

Thanks

strA = 'A' or 'B' or 'C' or 'D'

Edited 7 Years Ago by mms6: n/a

I want to allow certain characters to a string
For example I want

strA to contain either 'A' or 'B' or 'C' or 'D'

How do I do that, help would be greatly appreciated.

Thanks

strA = 'A' or 'B' or 'C' or 'D'

Your questions are soooo vague. Could you please post what code you have? Giving us a example input/output never hurt either! I feel like I anwsered this question from you in the last 24 hours.

Comments
Very nice guy. Takes time to help out

sorry

I mean like if I input either A, B, C, or D into python shell

I would get like True

if I enter R or some other letter or number or character
I would get False

Thanks

I figured it out using a dumb way stating all conditions with boolean operators lol
Your way is much nicer, thanks a bunch.

This question has already been answered. Start a new discussion instead.