pyg = 'ay' original = raw_input('Enter a word:') word = original.lower() if len(original) > 0 and original.isalpha(): print original else: print 'empty' word = "" first = word new_word = word + first + pyg
A lot is mixed up here.
Your else loop shouldn't have anything but:
else: print 'empty'
Re-write code, especially the if block.
thanks mate, it was a mistake on my part with the indentation
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.