Python Programming - Sets - Discussion

Discussion Forum : Sets - General Questions (Q.No. 8)
8.
What is the result of the expression set([1, 2, 2, 3, 4, 4, 5])?
{1, 2, 3, 4, 5}
[1, 2, 3, 4, 5]
set([1, 2, 3, 4, 5])
({1, 2, 2, 3, 4, 4, 5})
Answer: Option
Explanation:
A set automatically removes duplicate elements, resulting in {1, 2, 3, 4, 5}.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.