Mot de passe python avec des caractères spéciaux
special_chars = ['$', '&', '!']
password = input("Provide your password: ")
invalid = False
for char in password:
if char not in special_chars:
print('Invalid char found! Use only: {}'.format(special_chars))
invalid = True
break
if not invalid:
print('Valid password.')
Elegant Elephant