Advertisements
Advertisements
Question
Consider the following tuple declaration:
tup1 = ( 10, 20, 30, (10, 20, 30), 40)
Write the output of:
print(tupl.index(20))Short Answer
Advertisements
Solution
Output: 1
Explanation:
tupl.index(20) returns the index of the tuple's first occurrence of 20.
shaalaa.com
Is there an error in this question or solution?
