Commit 3093b3e5 by BellCodeEditor

save project

parent b4df06d8
Showing with 9 additions and 3 deletions
...@@ -2,7 +2,13 @@ with open(r"c:\Users\EDZ\Documents\lesson13-1\sales_list.txt","r",encoding="utf- ...@@ -2,7 +2,13 @@ with open(r"c:\Users\EDZ\Documents\lesson13-1\sales_list.txt","r",encoding="utf-
a=f.readlines() a=f.readlines()
#print(type(a[3:5])) #print(type(a[3:5]))
#print(a) #print(a)
for i in a: for i in a:
d=i.split() d=i.split()
print(d[0:1]) sum=0
print(d[1:]) for s in d[1:]:
\ No newline at end of file sum=sum+int(s)
q=d[0]+str(sum)
print(q)
# print(d[0:1])
# print(d[1:])
\ 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