COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Suppose a tuple test contains 5 elements. How can you set the 3rd element of the tuple to ‘Python’?
|
test[2] = ‘Python’
|
|
test[3] = ‘Python’
|
|
test(2) = ‘Python’
|
|
Elements of tuple cannot be changed
|
Explanation:
Detailed explanation-1: -The values that make up a list are called its elements. Lists are similar to strings, which are ordered sets of characters, except that the elements of a list can have any type.
There is 1 question to complete.