A

Admin • 833.24K Points
Coach

Q. What will `print({1, 2, 3} & {2, 3, 4})` output?

  • (A) {1, 2, 3, 4}
  • (B) {2, 3}
  • (C) {1, 4}
  • (D) Error
  • Correct Answer - Option(B)
  • Views: 31
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

`&` is the intersection operator for sets.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.