Commit c8ea8038 by BellCodeEditor

save project

parent 2c649771
Showing with 6 additions and 3 deletions
with open(r"c:\Users\bellcode\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8") as bjdfkbhjkfdhvkjfd:
# print(bjdfkbhjkfdhvkjfd.readlines())
sb=bjdfkbhjkfdhvkjfd.readlines()
sbstr=[]
for i in sb:
sd=i.split()
sum=0
for sales in sd[1:]:
sum+=int(sales)
print(sd[0]+str(sum))
\ No newline at end of file
sss=print(sd[0]+str(sum))
sbstr.append(sss)
with open(r"jfhjkfhfjhk.txt","a") as hghg:
hghg.writelines(sss)
\ 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