Lpthw Ex 34 - Doubt

I am having a doubt regarding this exercise. Do we have to execute the code using index() function or is there an another way to do it(eg. Loops, if - then etc)?

Hello @Mansi13

I think you could use paper and pen for this lesson.
The lesson is to get used to how python declare what is first, second, third and so on.

If there is a list of winner in a race, humans will say: the bear was first over the finnish line.
How would Python declare this position?

Do a list like the one in the exercise and try out yourself.

winner = ['hare','turtle']
winner[0]
1 Like

Thank you!! Got it!
winner [0] = hare; ordinal number = 1 and cardinal number = 0; 1st
winner[1] = turtle; ordinal number = 2 and cardinal number = 1, 2nd

2 Likes