Commit ce90484b by BellCodeEditor

save project

parent ec61a68c
Showing with 5 additions and 1 deletions
with open(r'c:\Users\6\Documents\lesson13-3\sales_list.txt','r',enoding:'utf-8') as file:
a=file.readlines()
finalsum=[]
for i in a:
data=i.split()
sum=0
for j in data[1:]:
sum+=int(j)
print(data[0]+str(sum))
reslut=data[0]+str(sum)+'/N'
finalsum.append(reslut)
while open(r"C:\Users\6\Desktop\text.txt","a","utf-8")as file1
\ 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