Can you, please, comment on this?
Hi, do you think this is professional? If not, please, tell me a proper way of getting input using function and also havning exceptions handled. def get_username(): counter = 0 # keep track of recursive steps username = None # string to be returned try: temp = input("Username: ") assert not temp[0].isdigit() #check so the first character is not a digit print("-|Input Complete!") username = temp # if this line is executed input is complete, setting value except AssertionError: print("-|Username can't start with a number!") print("-|Input Failed!") print("---------------") counter += 1 #incrementing step username = get_username() # recursive call finally: if(counter == 0): #Used this part to avoid $counter$ times repeat of this line print("-|Processing...") #if(counter == 0): print("-|Processing...") return username