$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · hard · #123

What is printed?

s = {3, 1, 2}
print(sorted(s) == [1, 2, 3], list(s)[0] == 1)
  1. True True
  2. True False
  3. False True
  4. False False
sorted always orders a set; for these small ints the iteration order also starts at 1.
Play Problem Solving ▸