#encoding=utf-8#
x=raw_input("Please enter a text: ")
y=x.replace(" ","")
f = open('Output.txt', 'w')
print >>f, y
f.close()
Python将文本去空格并保存到txt文件中
最新推荐文章于 2022-12-20 10:09:08 发布
#encoding=utf-8#
x=raw_input("Please enter a text: ")
y=x.replace(" ","")
f = open('Output.txt', 'w')
print >>f, y
f.close()