$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · medium · #104

What is printed?

print({1, 2} | {2, 3}, {1, 2} & {2, 3})
  1. {1, 2, 3} {2}
  2. {1, 2, 3} {1, 3}
  3. {2} {1, 2, 3}
  4. {1, 2, 2, 3} {2}
| is set union and & is set intersection.
Play Problem Solving ▸