What am I doing wrong?



File "python", line 12
SyntaxError: invalid syntax

I expect it to read and run until the end like it's supposed to; however, unless I indent the else statement, an indent error message appears. When I indent the else statement on line 12, that error message appears.

pyg = 'ay'

original = raw_input('Enter a word:')

word = original.lower()

first = word[0]
new_word = word + first + pyg[1:len(new_word)]

if len(original) > 0 and original.isalpha():
    print 'empty'


The suite (group of statements) of an if-statement can't be empty (what would be the point)


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