Python Programming - Sets - Discussion

Discussion Forum : Sets - General Questions (Q.No. 12)
12.
What is the result of the expression set('programming') | set('python')?
{'p', 'r', 'o', 'g', 'a', 'm', 'i', 'n'}
{'p', 'r', 'o', 'g', 'a', 'm', 'i', 'n', 'y', 't', 'h'}
['p', 'r', 'o', 'g', 'a', 'm', 'i', 'n']
('programming', 'python')
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.