After you add the isalpha() check, you would still get "empty" error when you are using a non-empty string that has non-letter characters. A better option would be to change it to something like "invalid" or "not a word"
Hi, @balinc ,
Agreed. Though the following
else structure departs from the instructions, it works ...
if len(original) > 0: if original.isalpha(): print original else: print "invalid word" else: print "empty"
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.