python trouver l'index par valeur
>>> ["foo", "bar", "baz"].index("bar")
1
Cook's Tree Boa
>>> ["foo", "bar", "baz"].index("bar")
1
animals = ['cat', 'dog', 'rabbit', 'horse']
# get the index of 'dog'
index = animals.index('dog')
print(index)
# Output: 1
1