Commit 568c326a by BellCodeEditor

save project

parent 95cc9288
Showing with 14 additions and 12 deletions
file=open(r'C:\Users\86185\Desktop\sales_list.txt','r',encoding='utf-8')
a=file.readlines()
final_sum=[]
for i in a:
sad=i.split()
sum=0
for sales in data[1:]
sum=sum+int(sales)
result=data[0]+str(sum)
print(result)
with open(r'C:\Users\86185\Desktop\sales_list.txt','a',encoding='utf-8')
file.writelines(final_sum)
class Hero:
def __init__(self):
self.level=1
self.Hp=300
self.attack=20
yase=Hero()
print(yase.level,yase.Hp,yase.attack)
......
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