1. Yes, a=(1,2,3,4) and b=(1,2,3,4)
2. Yes, a=(1,2,3) and b=(1,2,3,4)
3. No because tuples are immutable
4. No because wrong syntax for update() method
No because tuples are immutable
1. [(1, 2), (2, 4), (3, 9)]
2. [(2,4),(1,2),(3,9)]
3. Error because tuples are immutable
4. Error, tuple has no sort attribute
[(1, 2), (2, 4), (3, 9)]
1. Mutable data type
2. Allows duplicate values
3. Data type with unordered values
4. Immutable data type
Immutable data type
1. set([[1,2],[3,4]])
2. set([1,2,2,3,4])
3. set((1,2,3,4))
4. {1,2,3,4}
set([[1,2],[3,4]])
1. 7
2. Error, invalid syntax for formation of set
3. 4
4. 8
4
1. 5 5 6
2. 5 6 7
3. 5 5 6 7 7 7
4. 5 6 7 7 7
5 5 6 7 7 7
1. { }
2. set()
3. [ ]
4. ( )
set()
1. {1,2}
2. True
3. False
4. Invalid operation
True
1. print(len(a))
2. print(min(a))
3. a.remove(5)
4. a[2]=45
a[2]=45
1. a={5,5,6,7}
2. a={5,6,7}
3. Error as there is no add function for set data type
4. Error as 5 already exists in the set
a={5,6,7}