list1 = ["罗恩 23 35 44", \
"哈利 60 77 68 88 90", \
"赫敏 97 99 89 91 95 90", \
"马尔福 100 85 90"]

with open("xxx", "w", encoding="utf-8") as xxx:
for i in list1:
xxx.writelines(i + "\n")

with open("xxx", "r", encoding="utf-8") as xxx:
list2 = xxx.readlines()

for i in list2:
data = i.split()
s = 0
for j in data[1:]:
s = s + int(j)
res = data[0] + ":"+str(s)
with open("xxx", "a", encoding="utf-8") as xxx:
xxx.writelines(res + "\n")
print(res)