Python中文字符串,变成英文字符串

 

 

import pypinyin
 
def pinyin(word):
     s = ''
     for i in pypinyin.pinyin(word, style=pypinyin.NORMAL):
         s += ''.join(i)
     return s 
 
 unPinYin = pinyin(un)