Commit 62a8b70e by BellCodeEditor

save project

parent 5cafbab1
Showing with 3 additions and 7 deletions
with open(r"C:\Users\maku\Desktop\book.txt",'r',encoding='utf-8')as file1:
a=file1.readlines()
a=file1.read()
#print(a)
for i in a:
date=i.split()
sum=0
for sales in date[1:]:
sum=sum+int(sales)
result=date[0]+str(sum)
print(result)
\ No newline at end of file
print(date[0])
print(date[1:])
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