I get confused why the message always pops up like 'Welcome xxx' no matter what a user types.
username = input('Please enter your username: ')
if username == 'admin' or 'Admin' or 'ADMIN':
print(f'Welcome {username}')
Sorry I know it seems a silly question but hopefully it helps beginners like me understand or operator in python better.
Thank you for your help.
Aucun commentaire:
Enregistrer un commentaire