Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. chi_char = open(chinese_file,'r',encoding='UTF-8').read()
  2. include = set(string.printable+all_chi_char)
  3.  
  4. full_text = open(source_file,'r',encoding='UTF-8').read()
  5. output_text = ''.join(ch for ch in full_text if ch in include)
  6.  
  7. chi_char = open(chinese_file,'r',encoding='UTF-8').read()
  8. include = set(string.printable+all_chi_char)
  9.  
  10. full_text = open(source_file,'r',encoding='UTF-8').read()
  11. output_text = ''
  12. for ch in full_text:
  13. if ch in include:
  14. output_text += ch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement