#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
separators = [u"।", u",", u"."]
dat=open(r"C:\Users\User\Desktop\text4.txt",'r').read()
text=dat.decode("utf-8")
wros=text.split()
out=""
import string
space=" "
counter=0;
for word in wros:
out=u" ".join(word)
writ=open("C:\\Users\\User\\Desktop\\text5.txt",'w')
writ.write(out.encode('utf-8'))
writ.close()
인도의 역사는 매우 풍부하고 자세합니다. text5.txt는있는 그대로 출력됩니다.
인도의 역사는 매우 풍부하고 자세합니다.
내가 뭘 잘못하고 있는지 알려주세요. HElp가 필요합니다! 미리 감사드립니다
공간 u"0200"
이 0200
아니라 라고 생각 합니다. 공간을 사용하려면 space = u" "
.
이 단어들을 사이에 공백으로 연결하려면 다음을 실행하십시오.
u" ".join(w)
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다