Commit 238d3c97 by BellCodeEditor

save project

parent 2de77b94
Showing with 2 additions and 4 deletions
with open(r'C:\Users\Administrator\Documents\lesson13-5\sales_list.txt','r',encoding='utf-8') as file:
with open(r'C:\Users\Administrator\Documents\lesson13-4\sales_list.txt','r',encoding='utf-8') as file:
a = file.readlines()
#print(type(a[3:5]))
......@@ -9,5 +9,3 @@ for i in a:
sum = sum+int(sales)
result = data[0]+str(sum)
print(result)
\ No newline at end of file
with open(r'C:\Users\Administrator\Documents\hello.txt','a',encoding='utf-8') as file:
file.writelines(result+'\n')
\ 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