Commit 447a8569 by BellCodeEditor

save project

parent dc22b1a3
Showing with 22 additions and 0 deletions
with open(r'D:\DSC\DSC.txt','r',encoding = 'utf-8') as DSCHA1:
for date in DSCHA1:
if 'SC:100000000000000' in date:
print('SC数据在文件中')
\ No newline at end of file
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
# DSCHA1 = open(r'D:\DSC\DSC.txt','w',encoding = 'utf-8')
# DSCHA1.write('小黑:100000000000000\n')
# DSCHA1.write('大黑:99999999999999999999999999999999999\n')
# DSCHA1.write('中黑:0.5\n')
# DSCHA1.close()
# DSCHA1 = open(r'D:\DSC\DSC.txt','a',encoding = 'utf-8')
# DSCHA1.write('SC:100000000000000\n')
# DSCHA1.close()
with open(r'D:\DSC\DSC.txt','a',encoding = 'utf-8') as DSCHA1:
DSCHA1.write('SC:100000000000000\n')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment