.isalpha not working properly


Hello, my code is working but not properly. the .isalpha suppose to cancel out any word with numbers but now it doesnt matter what i type, the computer will print “empty” , thank you.

print 'Welcome to the Pig Latin Translator!'

original = raw_input("Enter a word:")
if len(original) > 0 and original.isalpha():
  print "empty"


Did you try after refreshing your browser?

what’s your input?


hey sorry I just figured out why, when I input my word I had pressed spaced after “:” so it would register it as empty, my bad.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.