how to insert random error in a programming
wuwei23 at gmail.com
Tue Oct 16 03:21:55 CEST 2012
On Oct 16, 5:52 am, Chris Angelico <ros... at gmail.com> wrote:
> Surely there's a shorter way to rot13 a piece of text? CODE GOLF!
In Python2: "a piece of string".encode('rot13') :)
> At very least, a single cryptic expression in place of your nice clear
> loops MUST be an improvement.
> d = dict((chr(i+c),chr((i+13)%26+c))for i in range(26)for c in(65,97))
Do I get points for explicitness?
import string as s
print "a piece of text".translate(
More information about the Python-list