您可能会发现unipredata模块很方便:
>>> s = "N{BLACK SPADE SUIT}">>> s'♠'>>> import unipredata>>> unipredata.name(s)'BLACK SPADE SUIT'>>> ord(s)9824>>> hex(ord(s))'0x2660'
您可能会发现unipredata模块很方便:
>>> s = "N{BLACK SPADE SUIT}">>> s'♠'>>> import unipredata>>> unipredata.name(s)'BLACK SPADE SUIT'>>> ord(s)9824>>> hex(ord(s))'0x2660'