This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
from pypinyin import pinyin, lazy_pinyin, Style | |
def cn_char(text): | |
return all('\u4e00' <= char <= '\u9fff' for char in text) | |
if __name__ == '__main__': | |
data =[] | |
with open('contacts.csv', encoding='utf-8') as f: |