ProgrammingVery hardTCS NQT · Accenture

What is printed?

What is printed?
print('ß'.isupper(), 'Dž'.istitle(), 'Dž'.isupper(), '1A'.isupper())
  1. A. False False True True
  2. B. True True False True
  3. C. False True False True
  4. D. False True True True

Correct answer: C. False True False True

ß has no uppercase form, so isupper is False. Dž is a titlecase letter, so istitle is True and isupper is False. '1A' has one cased character and it is uppercase, so isupper is True.

More Python Programming questions

Exams that ask this topic