Commit 2bbc4f4b by BellCodeEditor

save project

parent 5ec53ebb
Showing with 16 additions and 0 deletions
with open('c:\\Users\\Administrator\\Desktop\\wsm.txt','r',encoding='utf-8') as file:
a=file.readlines()
# print(a)
p=[]
for i in a:
data=i.split()
sum=0
for sales in data[1:]:
sum=sum+int(sales)
k=data[0]+str(sales)+'\n'
p.append(k)
with open('c:\\Users\\Administrator\\Desktop\\new_wsm.txt','a',encoding='utf-8') as file:
file.writelines(p)
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
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