B.isdigit() -> bool Return True if all characters in B are digits and there is at least one character in B, False otherwise.
>>> b'1234'.isdigit() True >>> b'1.23'.isdigit() False
builtins/bytearray.isdigit
bytearray.isdigit