#20190416001
f = open("students.txt","r")
infor = f.readlines()
list1 = ['学号:',',姓名:',',年龄:',',专业:',',分数"']
num = len(infor)
for i in range(num):
    if i :
        line = infor[i].strip()
        line = line.split('\t')
        for k in range(len(list1)):
            print(list1[k],line[k],end='')
        print('\n')
f.close()
out = open("students.txt","a")
in_new = ['1005','jerry','22','文学','91']
out.write('\n')
for sg in in_new:
    sg+='\t'
    out.writelines(sg)
out.close()
f = open("students.txt","r")
new = open("students_new.txt","w")
inf = f.readlines()
for line in inf:
    #line = line.strip()
    new.writelines(line)
f.close()
new.close()