How to covert ASCII to integer in Python?
Lloyd Zusman
ljz at asfast.com
Thu Feb 22 13:35:33 EST 2007
More information about the Python-list mailing list
Thu Feb 22 13:35:33 EST 2007
- Previous message (by thread): How to covert ASCII to integer in Python?
- Next message (by thread): How to covert ASCII to integer in Python?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"John" <rds1226 at sh163.net> writes: > I just found ord(c), which convert ascii to integer. > > Anybody know what the reverse is? The inverse of "ord" is "chr": % python Python 2.5 (r25:51908, Jan 5 2007, 00:12:45) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> ord('i') 105 >>> chr(105) 'i' >>> IIRC, the first use of the names "ord" and "chr" for these functions appeared in the Basic language in the 1960's ... in case anyone is interested in this bit of historical trivia. -- Lloyd Zusman ljz at asfast.com God bless you.
- Previous message (by thread): How to covert ASCII to integer in Python?
- Next message (by thread): How to covert ASCII to integer in Python?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list