Sep-03-2017, 11:54 AM
Hi,
Still the same problem with the else :(
Still the same problem with the else :(
def user_name(): with open("password.txt","r") as access: for line in access: words = line.splite() s = input("Enter a username: ") user_index = None for index, user in enumerate(text): if s in user: user_index = index if user_index is None: print("User not found") else: #invalid syntax s = input("Enter a password: ") if s in text[user_index]: #user_name()