diff --git a/traitement.py b/traitement.py index e69de29..9e7233e 100644 --- a/traitement.py +++ b/traitement.py @@ -0,0 +1,19 @@ +def traitement(stats): + lst_joueur = [] + lst_action = [] + lst_x = [] + lst_y = [] + with open ('stats.txt') as s: + for ligne in s: + ligne = ligne.strip() + lst_ele = ligne.split(' ') + joueur = str(lst_ele[0]) + action = str(lst_ele[1]) + x = int(lst_ele[2]) + y = int(lst_ele[3]) + lst_joueur.append(joueur) + lst_action.append(action) + lst_x.append(x) + lst_y.append(y) + return lst_joueur , lst_action , lst_x , lst_y +traitement("stats.txt") \ No newline at end of file