from pypinyin import lazy_pinyin,TONE,TONE2,TONE3,NORMAL a = "小七同学" b = "小琦同学" c = "小雅同学" d = "小娅同学" print(lazy_pinyin(a,style=NORMAL)) print(lazy_pinyin(b,style=NORMAL)) print(lazy_pinyin(c,style=NORMAL)) print(lazy_pinyin(c,style=NORMAL)) print(lazy_pinyin(a,style=TONE)) print(lazy_pinyin(b,style=TONE)) print(lazy_pinyin(c,style=TONE)) print(lazy_pinyin(c,style=TONE)) print(lazy_pinyin(a,style=TONE2)) print(lazy_pinyin(b,style=TONE2)) print(lazy_pinyin(c,style=TONE2)) print(lazy_pinyin(c,style=TONE2)) print(lazy_pinyin(a,style=TONE3)) print(lazy_pinyin(b,style=TONE3)) print(lazy_pinyin(c,style=TONE3)) print(lazy_pinyin(c,style=TONE3)) ['xiao', 'qi', 'tong', 'xue'] ['xiao', 'qi', 'tong', 'xue'] ['xiao', 'ya', 'tong', 'xue'] ['xiao', 'ya', 'tong', 'xue'] ['xiǎo', 'qī', 'tóng', 'xué'] ['xiǎo', 'qí', 'tóng', 'xué'] ['xiǎo', 'yǎ', 'tóng', 'xué'] ['xiǎo', 'yǎ', 'tóng', 'xué'] ['xia3o', 'qi1', 'to2ng', 'xue2'] ['xia3o', 'qi2', 'to2ng', 'xue2'] ['xia3o', 'ya3', 'to2ng', 'xue2'] ['xia3o', 'ya3', 'to2ng', 'xue2'] ['xiao3', 'qi1', 'tong2', 'xue2'] ['xiao3', 'qi2', 'tong2', 'xue2'] ['xiao3', 'ya3', 'tong2', 'xue2'] ['xiao3', 'ya3', 'tong2', 'xue2']