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

What is the output?

print({'a': 1} | {'a': 2, 'b': 3})
  1. {'a': 2, 'b': 3}
  2. {'a': 1, 'b': 3}
  3. {'a': 3, 'b': 3}
  4. Error
The dict union operator added in 3.9 lets the right operand win on conflicts.
Play Problem Solving ▸