Ending Up


#1

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
print original
word = original.lower()
first = word[0]
new_word = word + first + pyg
print [1:len(new_word)]

else:
print 'empty'

getting a syntax error on the print[1:len(new_word)] line tried it some other ways also but cant seem to figure it out feel like its an easy fix just cant find it :stuck_out_tongue: any help would be awesome


#2

the indents are there after the if and else just as a heads up


#3

not really sure how i found it but this fixed it for me...

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
print original
word = original.lower()
first = word[0]
new_word = word[1:len(word)] + first + pyg
print new_word
else:
print 'empty'


#4

@havz

new_word = word + first + pyg
new_word = new_word[1:]
print new_word[1:]
print new_word

use it, u haven't set the new_word to slice that's what causing the error