Advertisements
Advertisements
Question
Given the following Tuple.
Tup = (10, 20, 30, 50)
Which of the following statements will result in an error?
Options
print(Tup [0])Tup.insert (2, 3)print(Tup[1:2])print(len(Tup))
MCQ
Advertisements
Solution
Tup.insert (2, 3)
Explanation:
Tuples are immutable and will not work with the insert method.
shaalaa.com
Is there an error in this question or solution?
