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?
Have a look at the str.maketrans() and str.translate() methods:
>>> trans = str.maketrans("abc", "xyz")
>>> "abba cdef".translate(trans)
'xyyx zdef'
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor