A rather unpythonic way of doing things

Fredrik Lundh fredrik at pythonware.com
Thu Sep 29 11:08:08 EDT 2005


"fraca7" wrote:

> print ''.join(map(lambda x: chr((((ord(x) - ord('a')) + 13) % 26) + ord('a')), 'yvfc'))

that's spelled

    print "yvfc".decode("rot-13")

or, if you prefer,

    print "yvfc".encode("rot-13")

, in contemporary python.

</F> 






More information about the Python-list mailing list