ProgrammingHardTCS NQT · Accenture

What is printed?

What is printed?
print(isinstance([], list) and isinstance((), tuple), type([]) == list)
  1. A. True True
  2. B. True False
  3. C. False True
  4. D. False False

Correct answer: A. True True

Both isinstance checks are True, and type([]) is the list class, so the comparison is True.

More Python Programming questions

Exams that ask this topic