You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
569 B
18 lines
569 B
3 weeks ago
|
def reussite(joueur, action):
|
||
|
with open('stats.txt', 'r') as f:
|
||
|
lst_joueur = []
|
||
|
lst_action = []
|
||
|
for ligne in f:
|
||
|
ligne = ligne.strip()
|
||
|
lst_element = ligne.split(' ')
|
||
|
nom_joueur = lst_element[0]
|
||
|
nom_action = lst_element[1]
|
||
|
lst_joueur.append(nom_joueur)
|
||
|
lst_action.append(nom_action)
|
||
|
i = -1
|
||
|
lst_action_joueur = []
|
||
|
for nom in lst_joueur:
|
||
|
i = i+1
|
||
|
if nom == joueur:
|
||
|
action_joueur = lst_action[i]
|
||
|
|