Python Tutorial: How To Use The List Index Method in Python

preview_player
Показать описание
In this Python tutorial, we look at how to find the index position of a object in a list using the list index method in Python.
Рекомендации по теме
Комментарии
Автор

a 2 minute video was the answer to a problem I was trying to solve for 3 days

superstrongninja
Автор

How do you find the positions of more than one word?

alexward
Автор

why do we add 2 parameters to the index function? like list.index(4, 2) in a list of numbers

MrSoumya
Автор

How do you find the position if something appears on the list more than once? For example, if a = ['Dog', 'Cat', 'Fish, 'Dog'], how do you index 'Dog' and get 0 and 3?

justingrilli
Автор

Hey man!

How can i keep track of dice roll statistics for 5 die that will be rolled more than once. I need to display how many times each die face value was rolled. This is what i have so far.
die1 = random.randint(1, 6)
die2 = random.randint(1, 6)
die3 = random.randint(1, 6)
die4 = random.randint(1, 6)
die5 = random.randint(1, 6)

bobsacamano