Commit 7c24275e by BellCodeEditor

save project

parent 99941e9b
Showing with 9 additions and 5 deletions
binbin=open(r"c:\Users\LX\Desktop\sales_list.txt","r",encoding='utf-8')
jiege=binbin.readlines()
e=[]
for awei in jiege:
data=awei.split()
#print(data[0])
#print(data[1:])
meiqiayi=0
for shuhui in data:
meiqiayi=meiint(shuhui)
d=data[0]+str(meiqiayi)
for shuhui in data[1:]:
meiqiayi=meiqiayi+int(shuhui)
d=data[0]+str(meiqiayi)+'\n'
e.append(d)
print(d)
binbin.close()
jinluenfawang=open(r"c:\Users\LX\Desktop\sales_list.txt","r",encoding='utf-8')
\ No newline at end of file
jinluenfawang=open(r"c:\Users\LX\Desktop\please.txt","w",encoding='utf-8')
jinluenfawang.writelines(e)
\ 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