0

why whene i type login and after that i type a password that is not in the list python prints successfuly logged in

s = ["rayen123","amine1234","jack"] x = input("welcome to facedouk you have to type login to login or register to create a new account \n :") if x == "login": t = input("type your password \n :") if t == s[0] or s[1] or s[2]: print("loged in successfuly") else: print("sorry there is no account maked with this password") if x == " register ": s.append(input(" create a password \n :"))

13th Sep 2020, 8:16 PM
MohamedRayen Lamouchi
MohamedRayen Lamouchi - avatar
2 Réponses
+ 1
If condition shloud be like if t in s : Or if t==s[0] or t==s[1] or t==s[2] :
13th Sep 2020, 8:32 PM
Jayakrishna 🇮🇳
0
Thanks
13th Sep 2020, 8:39 PM
MohamedRayen Lamouchi
MohamedRayen Lamouchi - avatar