Commit 4a6b7fbf by BellCodeEditor

auto save

parent 5ec53ebb
Showing with 18 additions and 2 deletions
......@@ -10,4 +10,20 @@
刘若若 11 11 13 11 20 15 13 29 24
刘阳 11 15 22 11 23 26 22 15 17 52 12
王胜男 27 15 15 26 13 12 15
王娇 12 11 12 12 15 35 23 11
\ No newline at end of file
王娇 12 11 12 12 15 35 23 11
a=open("C:\Users\CZX\Desktop\新建文本文档.txt","w")
a.write("王五, 23 34 56\n")
a.write("赵六, 23 34 56\n")
a.write("李四, 23 34 56\n")
a.close()
a=open("C:\Users\CZX\Desktop\新建文本文档.txt","r")
for i in a:
data=i.split()
print(data[1:])
sum=0
for qwe in data[1:]
sum=sum+int(qve)
zxc=data[0]+str(sum)
print(zxc)
#sb=a.readlies()
#print(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