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

What is printed?

print(len({1, 1, 2}))
  1. 2
  2. 3
  3. 1
  4. 0
A set literal drops the repeated 1, leaving two members.
Play Problem Solving ▸