import os
fil=os.path.abspath("report.md")
drkt=os.path.dirname(fil)
sps3=[['Иванов И.',1],['Петров П.',2],['Сидоров С.',3]]
gh=open(drkt+'/TEMA6/zapis5.txt','w')
for r in sps3: gh.write(r[0]+' '+str(r[1])+'\n')
gh.close()