What Will Be The Output Of The Following Python Code Snippetp #536
What will be the output of the following Python code snippet?</p> <pre><code class="language-python">l=[1, 2, 4, 5, 2, 'xy', 4] set(l) l</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Python Sets - Python Sets - Quiz No.5.
What will be the output of the following Python code snippet?
l=[1, 2, 4, 5, 2, 'xy', 4] set(l) l
{1, 2, 4, 5, 2, ‘xy’, 4} [1, 2, 4, 5, 2, ‘xy’, 4]
{1, 2, 4, 5, ‘xy’} [1, 2, 4, 5, 2, ‘xy’, 4]
{1, 5, ‘xy’} [1, 5, ‘xy’]
{1, 2, 4, 5, ‘xy’} [1, 2, 4, 5, ‘xy’]