Ray's playground

 

Recipe 1.2. Converting Between Characters and Numeric Codes(Python Cookbook)

 1 >>> print ord('a')
 2 97
 3 >>> print chr(65)
 4 A
 5 >>> print unichr(8224)
 6 
 7 >>> print repr(unichr(8224))
 8 u'\u2020'
 9 >>> print ord(u'\u2020')
10 8224

 

posted on 2010-12-16 11:13  Ray Z  阅读(144)  评论(0)    收藏  举报

导航