Commit 2f807c0e by BellCodeEditor

save project

parent cf0ea4da
Showing with 14 additions and 0 deletions
a=open(r"C:\Users\HP820G2\Desktop\sales_list.txt","r",encoding="utf-8")
z=a.readlines()
for i in z:
y=i.split()
# print(y[0])
# print(y[1:])
sum=0
for a in y[1:]:
sum=sum+int(a)
x=y[0]+str(sum)
print(x)
a.close()
\ 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