From 2e6ea30105278f01062c2ee6348d779407b96b75 Mon Sep 17 00:00:00 2001 From: s441403 Date: Sat, 2 Jun 2018 13:54:48 +0200 Subject: [PATCH] zadanie 5 z lab04 zrobiono --- labs04/Zadanie5.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 labs04/Zadanie5.py diff --git a/labs04/Zadanie5.py b/labs04/Zadanie5.py new file mode 100644 index 0000000..7b50444 --- /dev/null +++ b/labs04/Zadanie5.py @@ -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) +