Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chi_char = open(chinese_file,'r',encoding='UTF-8').read()
- include = set(string.printable+all_chi_char)
- full_text = open(source_file,'r',encoding='UTF-8').read()
- output_text = ''.join(ch for ch in full_text if ch in include)
- chi_char = open(chinese_file,'r',encoding='UTF-8').read()
- include = set(string.printable+all_chi_char)
- full_text = open(source_file,'r',encoding='UTF-8').read()
- output_text = ''
- for ch in full_text:
- if ch in include:
- output_text += ch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement