111k views
2 votes
What is the next line? >>> myTuple = [10, 20, 50, 20, 20, 60] >>> myTuple.index(50) 3 1 4 2

2 Answers

1 vote

Answer:

3

Step-by-step explanation:

You see 3 since there are 3 occurrences of 20 in the tuple. (the 2 from the other answer is wrong on edge, I just finished taking this assignment and it told me the correct answer is 3)

User Beanumber
by
4.8k points
6 votes

Answer:

It's not 3, It's 2.

Step-by-step explanation:

Remember that the index of the first element is zero. Since 50 is the third element, Python returns 2.

User Matt Corby
by
5.5k points