1. 30
2. 24
3. 33
4. 12
33
1. Tuple
2. Integer
3. List
4. Both tuple and integer
Integer
1. Error, tuple slicing doesn’t exist
2. [2,3]
3. (2,3,4)
4. (2,3)
(2,3)
1. False
2. True
3. Error, < operator is not valid for tuples
4. Error, < operator is valid for tuples but not if there are sub-tuples
False
1. (‘Check’,’Check’,’Check’)
2. * Operator not valid for tuples
3. (‘CheckCheckCheck’)
4. Syntax error
(‘CheckCheckCheck’)
1. Now, a=(1,2,4)
2. Now, a=(1,3,4)
3. Now a=(3,4)
4. Error as tuple is immutable
Error as tuple is immutable
1. Too many arguments for sum() method
2. The method sum() doesn’t exist for tuples
3. 12
4. 9
12
1. No because tuple is immutable
2. Yes, first element in the tuple is deleted
3. Yes, the entire tuple is deleted
4. No, invalid syntax for del method
Yes, the entire tuple is deleted
1. Array of tuples
2. List of tuples
3. Tuples of lists
4. Invalid type
List of tuples
1. Invalid syntax for slicing
2. [0,2]
3. (0,1)
4. (0,2)
(0,1)