Nov-25-2017, 06:36 PM
I have a very simple issue that i just can't get right.
It is strange because i remember being able to do this. But now the code i always used to use no longer works (although i never updated my python version 3.4.3)
while True:
password = input('Enter a password:')
illegalSymbols = ['!','@','#','$','%','^','&','*','(',')']
for i in illegalSymbols[range(1,10)]:
if i in password == True:
print('Your password contains not allowed symbols!')
#This simple loop is supposed to identify symbols that are not allowed and give an error message.
#I tried every possible combination, loop anything that i could think of but this just isn't happening.
It is strange because i remember being able to do this. But now the code i always used to use no longer works (although i never updated my python version 3.4.3)
while True:
password = input('Enter a password:')
illegalSymbols = ['!','@','#','$','%','^','&','*','(',')']
for i in illegalSymbols[range(1,10)]:
if i in password == True:
print('Your password contains not allowed symbols!')
#This simple loop is supposed to identify symbols that are not allowed and give an error message.
#I tried every possible combination, loop anything that i could think of but this just isn't happening.