What is the result of `frozenset({1,2,3}) & frozenset({2,3,4})`?

Python Professional Hard

Python Professional — Hard

What is the result of `frozenset({1,2,3}) & frozenset({2,3,4})`?

Key points

  • The `&` operator in Python is used to find the intersection of two sets.
  • The intersection of sets contains only the elements that are present in both sets.
  • The correct answer, `frozenset({2,3})`, is the set of elements that are common between the two given sets.

Ready to go further?

Related questions