Trying to get python to return that a string contains ONLY alphabetic letters AND not spaces .
def valide(name):
for i in range(0,len(name)):
if name[i] == " ":
print("error, no spaces allowed!")
break
while True:
nam = input("give us the name: ")
valide(nam)
It's like an login system that does not allow the name to have sapce here i want if the string contains a space then return to getting another name and rechecking the condition.
i want the user re-enter another name to re-check if it contains a space