Commit 02be4f46 by BellCodeEditor

save project

parent 614694a6
Showing with 9 additions and 0 deletions
with open(r'C:\Users\gzs\Desktop\sales_list.txt')as file:
for line in file.readlines():
li=line.split()
name=li[0]
nums=li[1:]
sum=0
for num in nums:
sum=sum+int(num)
print(f'{name}{sum}')
\ 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