Use .isalpha()


#1
print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input("Enter a word:")
if len(original) > 0 and original.isalpha():
    word = original.lower()
    first = word[0]
else:    
    print "empty"

what have I done wrong?


#2

Please make sure that your post is readable. I edited it to remove a bunch of cruft and ensure that the code is formatted correctly.

There’s still no way to answer your question though. What do you mean by “wrong”? Describe the situation, and ask specific questions if at all possible.


#3

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