forked from tdwojak/Python2018
laboratoria4
This commit is contained in:
parent
b60f116f5e
commit
bec8e2ab49
22
labs04/task05.py
Normal file
22
labs04/task05.py
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import glob
|
||||
|
||||
lista_plikow = glob.glob('J:\PycharmProjects\Python2018\labs04\scores\*')
|
||||
|
||||
wyniki=[]
|
||||
for plik in lista_plikow:
|
||||
tekst = open(plik, 'r')
|
||||
tmp=[]
|
||||
for linia in tekst.readlines():
|
||||
tmp=(linia.strip()).split(' ')
|
||||
wyniki.append(float(tmp[2].replace(',','')))
|
||||
|
||||
max=wyniki[0]
|
||||
for i in range(1, len(wyniki)):
|
||||
if wyniki[i]>max:
|
||||
max=wyniki[i]
|
||||
max_iter = i
|
||||
|
||||
print(lista_plikow[max_iter])
|
Loading…
Reference in New Issue
Block a user