Simple Encryption

Thomas Heller theller at python.net
Tue Nov 19 05:03:33 EST 2002


"Bronek Carr" <BCARR1 at uk.ibm.com> writes:

> I am trying to write a simple ROT-13 encryption script in python.  A good
> starting point would be a function which gets the ascii value of a character
> in a string.  I would assume this function already exists in one of the
> packages, as it does in every other language I use.  I cannot find it if it
> does, can anyone help me.
> 

Does this help?

Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> "Hello World".encode("rot_13")
'Uryyb Jbeyq'
>>>

Thomas



More information about the Python-list mailing list