文件写入内容
"""
从键盘输入一些字符,逐个把它们写到磁盘文件上,直到输入一个 # 为止
"""
while True:
try:
s=input()
with open("./5.txt",'a') as f:
if s!='#':
f.write(s)
else:break
except:break
"""
从键盘输入一些字符,逐个把它们写到磁盘文件上,直到输入一个 # 为止
"""
while True:
try:
s=input()
with open("./5.txt",'a') as f:
if s!='#':
f.write(s)
else:break
except:break