Question #339

What is the output of the code snippet below?
s1 = {1, 2, 3}
s2 = {3, 4, 5, 6}
print(s1.difference(s2))

The function s1.difference(s2) returns a set containing the elements which are present in the set s1 but not in the set s2: in this case {1, 2} . (geeksforgeeks.org/python-set-difference)


Comment on Disqus:

Comment on Twitter:

Question difficulty: šŸ”µšŸ”µšŸ”µšŸ”µšŸ”µ