Python 字符 大小写分析

l=[]
u=[]
for i in range(0,0x110000):
    c=chr(i)
    if c.islower():l.append(c)
    elif c.isupper():u.append(c)

for c in l:
    if len(c.swapcase())!=1:print(c,c.encode('ascii',errors='namereplace'))
    
ß b'\\N{LATIN SMALL LETTER SHARP S}'
ʼn b'\\N{LATIN SMALL LETTER N PRECEDED BY APOSTROPHE}'
ǰ b'\\N{LATIN SMALL LETTER J WITH CARON}'
ΐ b'\\N{GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS}'
ΰ b'\\N{GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS}'
և b'\\N{ARMENIAN SMALL LIGATURE ECH YIWN}'b'\\N{LATIN SMALL LETTER H WITH LINE BELOW}'b'\\N{LATIN SMALL LETTER T WITH DIAERESIS}'b'\\N{LATIN SMALL LETTER W WITH RING ABOVE}'b'\\N{LATIN SMALL LETTER Y WITH RING ABOVE}'

你可能感兴趣的:(python,unicode)