189k views
3 votes
What is the next line?

>>> tupleA = (5, 20, 30, 40, 30)
>>> tupleA.index(30)
OO
0 1
03
02
Look at the picture

What is the next line? >>> tupleA = (5, 20, 30, 40, 30) >>> tupleA-example-1
User Amish
by
5.0k points

2 Answers

2 votes

Answer:

2

Step-by-step explanation:

User MrMime
by
5.3k points
5 votes

Answer:

The answer is "2"

Step-by-step explanation:

Following are the modified code to this question:

tupleA=(5, 20, 30, 40, 30)#defining a list tupleA that holds multiple integer value

print(tupleA.index(30))#defining print method that use a index method to print index value

In the above code, a list of integer variable tupleA is declared, that holds numbers, in the next step, tupleA is used with an index method, that holds a number "30", when we print its value it will return an index value that is equal to 3.

User Mickkk
by
5.0k points