Help me out, ending up


#1

i don't know what to do...

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'

it says

File "python", line 13
new_word = [1:len(new_word)]
^
IndentationError: unexpected indent

please help! thanks


#2

did you add some space before new_word ??


#3

@robberto12 Well without seeing your actual code it's hard to see what's really messed up. Unexpected indent usually means: bad whitespace.

Either try and delete around your line 13 and make sure you didn't accidentally add or omit an extra space anywhere, or screenshot your code and post it here and I will take a look.


#5

this is the finished 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
new_word = new_word[1:len(new_word)]
print new_word
else:
print 'empty'