Commit 5cd7dc6e by BellCodeEditor

save project

parent 6d3d4341
Showing with 22 additions and 6 deletions
with open(r'D:\DSC\DSC.txt','a',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本' # 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
DSCHA1 = open(r'D:\DSC\DSC.txt','w',encoding = 'utf-8') # DSCHA1 = open(r'D:\DSC\DSC.txt','w',encoding = 'utf-8')
DSCHA1.write('小黑:100000000000000\n') # DSCHA1.write('小黑:100000000000000\n')
DSCHA1.write('大黑:99999999999999999999999999999999999\n') # DSCHA1.write('大黑:99999999999999999999999999999999999\n')
DSCHA1.write('中黑:0.5\n') # DSCHA1.write('中黑:0.5\n')
DSCHA1.close() # DSCHA1.close()
\ No newline at end of file
# 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