Why are the instructions so unclear?


#1

I don't understand any of this

Set new_word equal to the slice from the 1st index all the way to the end of new_word.
Use [1:len(new_word)] to do this.

WHAT DO THE INSTRUCTIONS MEAN?
WHAT AM I SUPPOSED TO DO WITH THE CODE?
WHERE?
WHY CAN'T I GET NORMAL INSTRUCTIONS?

Here;s my code:

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

print new_word

else:
print 'empty'


#2

UPDATE
This is my code now

pyg = 'ay'
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():

word = original.lower()
first = word[0]
new_word = word[1:] + first + pyg

print new_word

else:
print 'empty'

Why does it work without
[1:len(new_word)]

And where does
[1:len(new_word)]
go?


#3

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