computing with characters

Kam-Hung Soh kamhung.soh at gmail.com
Wed Apr 30 03:01:37 EDT 2008


On Wed, 30 Apr 2008 16:13:17 +1000, SL <ni at hao.com> wrote:

> How can I compute with the integer values of characters in python?
> Like 'a' + 1 equals 'b' etc

Try: ord('a')

See also: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65117

-- 
Kam-Hung Soh <a href="http://kamhungsoh.com/blog">Software Salariman</a>



More information about the Python-list mailing list