Commit 559b5b1e by BellCodeEditor

save project

parent b8d49891
Showing with 13 additions and 14 deletions
with open(r'C:\Users\PC\Desktop\sales_list.txt.txt",'r')as file: with open(r'C:\Users\PC\Desktop\sales_list.txt.txt"'r') as file:
a=file.readlines() a = filter.readlines()
for i in a : # print(a)
data=i.split()
print(data[1:]) for i in a:
\ No newline at end of file data=i。split()
# print(data[1:])
sum=0
for sales in data[1:]:
sum=sum+int(sales)
result=data
print(result)
\ No newline at end of file
...@@ -7,10 +7,3 @@ with open = ('r"C:\Users\PC\Desktop\sales_list.txt.txt"'r') as file: ...@@ -7,10 +7,3 @@ with open = ('r"C:\Users\PC\Desktop\sales_list.txt.txt"'r') as file:
print() print()
with open(r'C:\Users\PC\Desktop\sales_list.txt.txt",'r',encoding='UTF-8') as file:
a = file.readlines()
# print(a)
for i in a:
data=i.split()
print(data[1:])
\ 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