bytearray.isalnum()

bytearray.isalnum()

Return true if all bytes in the sequence are alphabetical ASCII characters or ASCII decimal digits and the sequence is not empty, false otherwise. Alphabetic ASCII characters are those byte values in the sequence b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'. ASCII decimal digits are those byte values in the sequence b'0123456789'.

For example:

>>> b'ABCabc1'.isalnum()
True
>>> b'ABC abc1'.isalnum()
False
doc_python
2016-10-07 17:27:41
Comments
Leave a Comment

Please login to continue.