How do I convert characters into integers?

Binu K S binux.lists at gmail.com
Thu Dec 16 08:11:39 CET 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