Python Programming - Sets - Discussion

Discussion Forum : Sets - General Questions (Q.No. 39)
39.
What is the result of the expression set('python') | set('java')?
{'p', 'y', 't', 'h', 'o', 'n', 'j'}
{'p', 'y', 't', 'h', 'o', 'n'}
{'j', 'a', 'v'}
{'j', 'p', 't', 'o', 'h', 'n', 'a', 'y', 'v'}
Answer: Option
Explanation:
The '|' operator performs the union of two sets, combining unique elements.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.