bytes.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
Please login to continue.