ProgrammingModerateTCS CodeVita · Infosys HackWithInfy

What is printed?

What is printed?
print(any(map(str.isdigit, 'ab1')), all(map(str.isalpha, 'ab1')))
  1. A. True True
  2. B. False False
  3. C. True False
  4. D. False True

Correct answer: C. True False

The digit 1 makes any True. The digit 1 is not alphabetic, so all is False.

More Python Programming questions

Exams that ask this topic