Commit a768d1ef by BellCodeEditor

save project

parent b6debec4
Showing with 10 additions and 3 deletions
with open(r'C:\behjsgfjshkuseghsagusehkgrsrkhgt\bedside-cabinet.py_bell\bell.o_bellcode.bell.ai.place\bell.py.try make_right\test.txt','r',encoding='utf-8') as bell: with open(r'C:\behjsgfjshkuseghsagusehkgrsrkhgt\bedside-cabinet.py_bell\bell.o_bellcode.bell.ai.place\bell.py.try make_right\test.txt','r',encoding='utf-8') as bell:
a=bell.readlines() a=bell.readlines()
#print(a) #print(a)
result=''
for i in a: for i in a:
c_i=i.split() c_i=i.split()
list_bed=0 list_bed=0
for k in c_i[1:]: for k in c_i[1:]:
# print(k)
list_bed=list_bed+int(k) list_bed=list_bed+int(k)
result=c_i[0]+str(list_bed)
print(result) result+=c_i[0]+str(list_bed)+' '
\ No newline at end of file print(result)
with open(r'C:\behjsgfjshkuseghsagusehkgrsrkhgt\bedside-cabinet.py_bell\bell.o_bellcode.bell.ai.place\bell.py.try make_right\test.txt','a',encoding='utf-8') as bell:
for i in result.split():
bell.write('\n')
bell.write(i)
\ 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