coding: core code # -*- UTF-8 -*- 'Python English read files, each word according to space separated, and each word alone put a line' def dcfenhang (infile, outfile): infopen = open (infile,'r', encoding='utf-8') OUTOPEN = open (outfile,'w', lines = infopen.readlines (encoding='utf-8') line in lines: for) for DB in (line.split): if DB not in outfile: outopen.write (db+'n') infopen.close (outopen.close) (dcfenhang) ("jb51.txt", "fenci.txt") 


welcome to visit

Thans very much


This concludes the body part

This paper fixed link: | Script Home | +Copy Link

Article reprint please specify:Python separates each word by space and saves it to the file | Script Home

You may also be interested in these articles!