diff --git a/diy.py b/diy.py new file mode 100644 index 0000000..32f1a49 --- /dev/null +++ b/diy.py @@ -0,0 +1,4 @@ +# 写入同学们的1捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本' +a=open(r"D:\桌面\新建文本文档.txt",'w',encoding='utf-8') +a.write('小兰:12本,小丽:11本,李文:9本,张伟:16本') +a.close() \ No newline at end of file