On 18/11/13 03:27, Byron Ruffin wrote:
Need a little help with finding a process for this:
when a string of text is input, for example: abc def.
I want to have each letter shift to the right one place in the alphabet.
Thus..
abc def would be output as bcd efg.
Any ideas on how to do this?
Yes, use the ord() function to convert the letters to numbers. Add one
and convert back using the chr() function. Check for the special case of
'z'.
Consider how to handle upper case letters too.
hth
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor