forked from tdwojak/Python2018
zadanie 5 z lab04 zrobiono
This commit is contained in:
parent
d6f4abe562
commit
2e6ea30105
23
labs04/Zadanie5.py
Normal file
23
labs04/Zadanie5.py
Normal file
@ -0,0 +1,23 @@
|
||||
import glob
|
||||
|
||||
pliki = glob.glob('scores/*')
|
||||
|
||||
wyniki = []
|
||||
|
||||
for plik in pliki:
|
||||
f = open(plik, 'r')
|
||||
linia = f.readline()
|
||||
linia = linia.split(" ")
|
||||
|
||||
#print(linia)
|
||||
linia = [x.strip(",") for x in linia]
|
||||
wyniki.append(linia[2])
|
||||
|
||||
f.close()
|
||||
max_index = wyniki.index(max(wyniki))
|
||||
#print(wyniki)
|
||||
#print(max_index)
|
||||
max_value = wyniki[max_index]
|
||||
plik_z_maxBLEU = pliki[max_index]
|
||||
print(plik_z_maxBLEU)
|
||||
|
Loading…
Reference in New Issue
Block a user