Wierd error


Why in this code ( : ) colon become an invalid syntax? Getting no idea.



pyg = 'ay'
original = raw_input('Enter a word:')

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



Correct these:

new_word = [1:len(new_word)] should be new_word = new_word[1:len(new_word)]

print original should be print new_word


Thank You. :slight_smile:


Your welcome. If you have any trouble with Python, just provide me with the link and I will tell you the corrections you need to make- or I'll just tell you that I don't know. xD


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