用法:
bytes.isalnum()
bytearray.isalnum()
如果序列中的所有字節都是字母 ASCII 字符或 ASCII 十進製數字並且序列不為空,則返回
True
,否則返回False
。字母 ASCII 字符是序列b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
中的那些字節值。 ASCII 十進製數字是序列b'0123456789'
中的那些字節值。例如:
>>> b'ABCabc1'.isalnum() True >>> b'ABC abc1'.isalnum() False
相關用法
- Python bytes.isalpha用法及代碼示例
- Python bytes.isupper用法及代碼示例
- Python bytes.isdigit用法及代碼示例
- Python bytes.istitle用法及代碼示例
- Python bytes.islower用法及代碼示例
- Python bytes.zfill用法及代碼示例
- Python bytes.hex用法及代碼示例
- Python bytes.title用法及代碼示例
- Python bytes.removesuffix用法及代碼示例
- Python bytes.split用法及代碼示例
- Python bytes.lstrip用法及代碼示例
- Python bytes.expandtabs用法及代碼示例
- Python bytes.splitlines用法及代碼示例
- Python bytes.rstrip用法及代碼示例
- Python bytes.removeprefix用法及代碼示例
- Python bytes.strip用法及代碼示例
- Python bytes()用法及代碼示例
- Python bytearray()用法及代碼示例
- Python binascii.crc32用法及代碼示例
- Python base64.b64decode()用法及代碼示例
注:本文由純淨天空篩選整理自python.org大神的英文原創作品 bytes.isalnum。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。