How do I convert characters into integers?

Binu K S binux.lists at gmail.com
Thu Dec 16 02:11:39 EST 2004


On Wed, 15 Dec 2004 23:59:13 -0500, Adam DePrince <adam at cognitcorp.com> wrote:
> 
> message = [chr( (ord( x ) + 3 )%256) for x in message]
> 

Minor correction:
message = ''.join([chr( (ord( x ) + 3 )%256) for x in message])



More information about the Python-list mailing list