Commit 5c8692d3 by BellCodeEditor

save project

parent 51129bbb
Showing with 6 additions and 3 deletions
...@@ -2,6 +2,9 @@ with open('sales_list.txt','r',encoding='utf-8') as f: ...@@ -2,6 +2,9 @@ with open('sales_list.txt','r',encoding='utf-8') as f:
file=f.readlines() file=f.readlines()
print(file) print(file)
for i in file: for i in file:
print(i)
data=i.split() data=i.split()
print(data) print(data[0])
\ No newline at end of file for j in data[1:]:
sum = sum +int (j)
s=data[0]+str(sum)
print(s)
\ 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