Why would it say Login successful and Login not successful without the return True/False?
def passwords(name,password):
data = [("Peter", "thepeter"), ("James", "thejames")]
for x in data:
if x[0]==name and x[1]==password:
print("Login successful")
return True
else:
print("Login not successful")
return False
name1=input("Name:")
password1=input("Password:")
passwords(name1,password1)