Current Code:
def character_a():
character_a = input('Enter First Dot or Dash (. / -): ')
character_a()
if not character_a == "." or "-":
print('Invalid Character.. Try Again')
character_a()
else:
print('Valid Character')
Hello Im trying to write a python script where it asks you for a input of either a "." or "-" only problem is that you can in theory do any other letter or number. And I got it to check if its a character like a,b,c,etc But not Numbers How Can i make sure they only do "-", ".". And for my future code how can I also check to make sure they either do "-", ".", or "0" And not some other random character/digit like ; or ] etc etc.