Problèmes comparaison "int" "list"

vicgrgn -  
 Utilisateur anonyme -
Bonjour ,j'ai un programme à faire est à la ligne 11 j'ai une erreur qui est
( if int(ageParticipant[2]) > age:
TypeError: '>' not supported between instances of 'int' and 'list')

si quelqu'un peut me dire comment ne plus avoir cette erreur
Merci d'avance

1. source= open("C:\\Users\\Megaport\\Downloads\\jo.csv","r")
2. data = source.read()
3. lignes = data.split("\n")
4. lignes = lignes[1:]
5. lignesDetails = []

6. for ligne in lignes:
7. lignesDetails.append(ligne.split(","))

8. age = 0
9. ligneAge = []

10. for ageParticipant in lignesDetails:
11. if int(ageParticipant[2]) > age:
12. age = ageParticipant
13. ligneAge.append(ageParticipant)

1 réponse