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

What is the output?

print({1, True, 1.0})
  1. {1}
  2. {1, True}
  3. {1, True, 1.0}
  4. Error
All three are equal and hash alike, so the set keeps only the first one inserted.
Play Problem Solving ▸