Commit d9fc9999 by BellCodeEditor

save project

parent d1536a55
Showing with 13 additions and 0 deletions
with open(r'c:\Users\bellcode\Documents\lesson13-4\sales_list.txt','r',encoding='utf-8') as file:
a=file.readlines()
sum2=[]
for i in a:
data=i.split()
sum=0
for seles in data[1:]:
sum =sum+int(seles)
resule=data[0]+str(sum)
print(resule)
with open(r'c:\Users\bellcode\Documents\lesson13-5\sales_list.txt','w',encoding='utf-')as file:
file.writelines(sum2)
\ 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