ProgrammingModerateTCS CodeVita · Infosys HackWithInfy
What is printed?
What is printed?
print(any(map(str.isdigit, 'ab1')), all(map(str.isalpha, 'ab1')))
- A. True True
- B. False False
- C. True False
- 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
- What is printed? python print(sorted({'b': 1, 'a': 2}.items()), sum([1, 2, 3], start=10))
- What is printed? python print(max(3, 7, key=lambda v: -v), min('a', 'B'))
- What is printed? python print(str(True) + str(1 == 1.0), type(True + True).name)
- What is printed? python print(round(-0.5), round(0.5), round(1.5), round(-1.5))
- What is printed? python import bisect print(bisect.bisectright([1, 2, 2, 3], 2, lo=2))
- What is printed? python print(2 3 0, (2 3) 0)