User:Colm/prototyping-python

From XPUB & Lens-Based wiki
< User:Colm
Revision as of 13:56, 9 November 2015 by Colm (talk | contribs) (Created page with "= small python attempts from the class and others = <code> pyg = 'ay'<br> original = raw_input('Enter a word:')<br> if len(original) > 0 and original.isalpha():<br> word...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

small python attempts from the class and others

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'