string - Python: is isalnum() the same as isalpha with isdigit? -
is there way concretely verify this? tried solve coding question seems 1 of test cases (not revealed me) takes wrong. in kinds of cases fail true?
there cases when both isalpha
, isdigit
returns false
, isalnum
returns true
. isalnum
not combination of other two.
>>> 'a1'.isalpha(), 'a1'.isdigit(), 'a1'.isalnum() (false, false, true)
Comments
Post a Comment