John Salerno wrote: > It works, but is there a better way to shift the letters of the alphabet > for 'code'? I remember a method that did this for lists, I think, but I > can't remember what it was or if it worked for strings.
Ah ha! This is cleaner: alphabet = string.ascii_lowercase code = string.ascii_lowercase[2:] + string.ascii_lowercase[:2] Yet it still seems kind of verbose. But since that's the official solution, I guess there's no other way to shift the characters in a string? -- http://mail.python.org/mailman/listinfo/python-list