1. TrueFalse
2. FalseFalse
3. FalseTrue
4. TrueTrue
False
True
1. {1, 2, 4, 5, 2, ‘xy’, 4} [1, 2, 4, 5, 2, ‘xy’, 4]
2. {1, 2, 4, 5, ‘xy’} [1, 2, 4, 5, 2, ‘xy’, 4]
3. {1, 5, ‘xy’} [1, 5, ‘xy’]
4. {1, 2, 4, 5, ‘xy’} [1, 2, 4, 5, ‘xy’]
{1, 2, 4, 5, ‘xy’} [1, 2, 4, 5, 2, ‘xy’, 4]
1. {(3, 4), (1, 2)}
2. Error
3. {(4, 2), (3, 1), (4, 1), (5, 2)}
4. {(3, 1), (4, 2)}
{(4, 2), (3, 1), (4, 1), (5, 2)}
1. remove
2. pop
3. discard
4. dispose
pop
1. Discard removes the last element of the set whereas remove removes the first element of the set
2. Discard throws an error if the specified element is not present in the set whereas remove does not throw an error in case of absence of the specified element
3. Remove removes the last element of the set whereas discard removes the first element of the set
4. Remove throws an error if the specified element is not present in the set whereas discard does not throw an error in case of absence of the specified element
Remove throws an error if the specified element is not present in the set whereas discard does not throw an error in case of absence of the specified element
1. {1, 2}{4, 5, 6}
2. {1, 2}{1, 2}
3. {4, 5, 6}{1, 2}
4. {4, 5, 6}{4, 5, 6}
{1, 2}
{4, 5, 6}
1. TrueFalse
2. False True
3. TrueTrue
4. FalseFalse
True
True
1. s2.issubset(s1)
2. s2.issuperset(s1)
3. s1.issuperset(s2)
4. s1.isset(s2)
s2.issuperset(s1)
1. {3}{1, 2, 3, 4, 5, 6, 8}
2. {1, 2, 4, 5, 6, 8}{1, 2, 4, 5, 6, 8}
3. {3}{3}
4. {1, 2, 3, 4, 5, 6, 8}{1, 2, 3, 4, 5, 6, 8}
{1, 2, 3, 4, 5, 6, 8}
{1, 2, 3, 4, 5, 6, 8}
1. set()(‘e’, ‘d’, ‘f’}
2. {}{}
3. {‘b’, ‘c’, ‘a’}set()
4. set()set()
{‘b’, ‘c’, ‘a’}
set()