How do I get rid of the "None" that shows up


It says it is right although I don't know why the "None" keeps showing up and I don't know how to change it.

Can someone please help me in getting rid of the "None"?

pyg = 'ay'

original = raw_input('Enter a word:')
word = original.lower()
first = word[0]
new_word = word + first + pyg

if len(original) > 0 and original.isalpha():
    new_word = new_word[1:len(new_word)] 
    print new_word()
    print 'empty'


There is an error in your code, in this line:

print new_word()

new_word is only a plain variable, not a function and that is why it's uncallable. It should be:

print new_word

You can't get rid of the None by changing your code because it originates in the different place. This is a feature of codecademy environment, you will see None at the end of the output in every Python exercise. In the normal, real environment (you can run your code locally, just install Python in your computer) this None will not be printed to the console.