I am trying to make a variable (name) so it only accepts alphabet characters (eg. DaNiEl) not $@@4234.
Below is an example of the code i'm trying to use. I have tried a few functions, to no avail.
Can someone please post the answer (in code form). Much Appreciated.
name = str(input("What is the customers name? ")) print("") while True: @@@WHAT FUNCTION GOES HERE THAT DENIES INVALID TEXT?@@@@@ print("") print("You've typed something wrong, please only input letters.") name = str(input("What is the customers name? ")) else: break
Edited 4 Years Ago by dan.nitschke: Forgot