Apologies for the vague title. I wasn't sure how to make it specific enough.
I have some code that asks for a word and then turns it into a list of characters. I wanted to pass it through a loop to check in its isalpha().
When I run it. If my word is alpha it works fine. If my word has digits, it will restart the loop as planned and ask again.
However, the word gathered after a digit attempt will return a "None" and throw up an error when it tries to turn it into a list.
def start():
word = input("Enter word to turn into a list")
if word.isalpha():
word = word.lower()
return word
else:
print("Alpha only please")
start()
user = start()
word_list = list(user)
print (word_list)