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

What is the output?

a = (1,)
b = (1)
print(type(a) is type(b))
  1. False
  2. True
  3. None
  4. Error
The comma makes the tuple, not the parentheses — so b is just the integer 1.
Play Problem Solving ▸