Mar-31-2017, 07:36 PM
Actually how would I take this block and turn it into a while loop so that users can enter a new name if they choose:
else: with open(filename, 'r') as file_obj: names = file_obj.readlines() for name in names: if prompt_username.lower() == name.strip().lower(): print("Name Taken") breakI experimented already and if I put the while loop inside the for loop and it will allow usernames to be entered twice..