I tried this code:
name = str(input("What is your name? "))
if not name.isalpha():
print("Please enter a valid name.")
continue
but when I enter a name with a space or full name, I get the "Please enter a valid name." statement even if I only entered a name without any other types of data i.e. int, float.
Does the space count as a string? If not, how should I change my code so that it will accept a full name with spaces but not accept numbers?
Thanks.