Python3 chr() º¯Êý
ÃèÊö
chr() ÓÃÒ»¸öÕûÊý×÷²ÎÊý£¬·µ»ØÒ»¸ö¶ÔÓ¦µÄ×Ö·û¡£
Óï·¨
ÒÔÏÂÊÇ chr() ·½·¨µÄÓï·¨:
chr(i)
²ÎÊý
- i -- ¿ÉÒÔÊÇ 10 ½øÖÆÒ²¿ÉÒÔÊÇ 16 ½øÖƵÄÐÎʽµÄÊý×Ö£¬Êý×Ö·¶Î§Îª 0 µ½ 1,114,111 (16 ½øÖÆΪ0x10FFFF)¡£
·µ»ØÖµ
·µ»ØÖµÊǵ±Ç°ÕûÊý¶ÔÓ¦µÄ ASCII ×Ö·û¡£
ʵÀý
ÒÔÏÂչʾÁËʹÓà chr() ·½·¨µÄʵÀý£º
>>>chr(0x30)
'0'
>>> chr(97)
'a'
>>> chr(8364)
'€'