PygLatin


#1

I code this....

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
else:
    print 'empty'

And it says....

File "python", line 8
new_word=[1:len(new_word)]
[quote="qwee123, post:1, topic:36440, full:true"]

I code this and it says
File "python", line 8
new_word=[1:len(new_word)]
^
SyntaxError: invalid syntax

Help !!!

`


#2

you want to have a substring of new_word:

substring[1:len(new_word)]

and then you want to store this in an updated version of new_word:

new_word=new_word[1:len(new_word)]

#3

Thank you very much ..... !! it works...