Is there a way to concretely verify this? I tried to solve a coding question but it seems one of the test cases (not revealed to me) takes this as wrong. In what kinds of cases does this fail to be true?
There are cases when both isalpha and isdigit returns False, but isalnum returns True. So isalnum is not just a combination of the other two.
isalpha
isdigit
False
isalnum
True
>>> 'a1'.isalpha(), 'a1'.isdigit(), 'a1'.isalnum() (False, False, True)
2.1m questions
2.1m answers
60 comments
57.0k users