pyg = 'ay'
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
word = original.lower()
first = word
new_word = word + first + pyg
When you test your code are the results you get correct?
in your casenew_word = python + p + ay i.e pythonpay and you are printing the original word instead of the new word.just check out the below codenew_word= word[1:] + first + pygprint new_word
Please be sure to explain your code snippet.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.