Commit 0a8d9157 by BellCodeEditor

save project

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