username = input("Please enter a username: ") while len(username) < 8 or len(username) > 15: print("Username must be between 8 and 15 characters long.") username = input("Please enter a username: ") while username.isalnum() == False: print ("Username can only contain alphanumeric characters.") username = input("Please enter a username: ") while username.islower() == True: print ("Usernames must contain at least one uppercase character") username = input("Please enter a username: ") while username.isupper() == True: print ("Usernames must contain at least one lowercase character") username = input("Please enter a username: ") while username[0].isnumeric() == True: print ("The first character in a username cannot be a digit") username = input("Please enter a username: ") while username[-1].isnumeric() == True: print ("The last character in a username cannot be a digit") username = input("Please enter a username: ") while any(username.isdigit()) == False: print ("Usernames must contain at least one numeric character") # can't figure this one out username = input("Please enter a username: ") break
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)