What is the output of print('1234'.isdigit()) in Python?
print('1234'.isdigit())
Correct answer
B. True
11 views
B. True
11 views
isdigit() returns True if all characters are digits and the string is non-empty.
Asked in: Python Interview Strings
https://docs.python.org/3/library/stdtypes.html#string-methodsNot sure why the answer is B? Ask here and get an explanation.