1. {4,5,6,2,8}
2. {4,5,6,2,8,6}
3. Error as unsupported operand type for sets
4. Error as the duplicate item 6 is present in both sets
Error as unsupported operand type for sets
1. {4,5}
2. {6}
3. Error as unsupported operand type for set data type
4. Error as the duplicate item 6 is present in both sets
{4,5}
1. {5,6,7,8,10,11}
2. {7,8}
3. Error as unsupported operand type of set data type
4. {5,6,10,11}
{5,6,10,11}
1. Error as unsupported operand type for set data type
2. {5,6,5,6,5,6}
3. {5,6}
4. Error as multiplication creates duplicate elements which isn’t allowed
Error as unsupported operand type for set data type
1. True
2. False
True
1. Invalid operation
2. {3, 4, 5, 6, 7}
3. {5}
4. {3,4,6,7}
{3, 4, 5, 6, 7}
1. Yes, 7 is printed
2. Error, elements of a set can’t be printed
3. Error, subsets aren’t allowed
4. Yes, {7,5} is printed
Error, subsets aren’t allowed
1. Mutable data type
2. Allows duplicate values
3. Data type with unordered values
4. Immutable data type
Mutable data type
1. {5,6,7}
2. frozenset({5,6,7})
3. Error, not possible to convert set into frozenset
4. Syntax error
frozenset({5,6,7})
1. Yes, now a is {5,5,6,7}
2. No, frozen set is immutable
3. No, invalid syntax for add method
4. Yes, now a is {5,6,7}
No, frozen set is immutable