1
0
forked from tdwojak/Python2017
Python2017/labs03/task05.py
2017-12-16 09:02:29 +01:00

17 lines
351 B
Python

import glob
import re
files=glob.glob("scores\*.*")
c=[]
for file in files:
with open(file, 'r') as current_file:
a=current_file.read(12)
a=a[7:12]
a = [float(i) for i in re.findall(r"[-+]?\d*\.\d*", a)]
c.append(a)
c[0]
w=c.index(max(c))
myfile=files[w]
import os
print (os.getcwd()+"\\"+ myfile)