Q30
What will be the output of the following Python code snippet? l=[1, 2, 4, 5, 2, 'xy', 4] set(l) l
A.
{1, 2, 4, 5, 2, ‘xy’, 4}
[1, 2, 4, 5, 2, ‘xy’, 4]
[1, 2, 4, 5, 2, ‘xy’, 4]
B.
{1, 2, 4, 5, ‘xy’}
[1, 2, 4, 5, 2, ‘xy’, 4]
Answer[1, 2, 4, 5, 2, ‘xy’, 4]
C.
{1, 5, ‘xy’}
[1, 5, ‘xy’]
[1, 5, ‘xy’]
D.
{1, 2, 4, 5, ‘xy’}
[1, 2, 4, 5, ‘xy’]
[1, 2, 4, 5, ‘xy’]
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board