汉语转拼音工具 项目地址:https://github.com/mozillazg/python-pinyin 简单应用示例 from pypinyin import pinyin, lazy_pinyin, Style pinyin('安徽') [['ān'], ['huī']] pinyin('中心', heteronym=True) # 启用多音字模式 [['zhōng', 'zhòng'], ['xīn']]