ProgrammingModerateTCS NQT · Wipro pattern

What is printed?

What is printed?
print('a' < 'b' < 'c', 'b' > 'a' and 'b' > 'c')
  1. A. True True
  2. B. True False
  3. C. False False
  4. D. False True

Correct answer: B. True False

Chained string comparisons hold for a < b < c. The and needs b > c, which is False.

More Python Programming questions

Exams that ask this topic