PyDocs

Nav

Python Runtime Services

str.isalnum

builtins

method of str
  • str.isalnum()
Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are
alpha-numeric and there is at least one character in the string.
1 Example
>>> 'abc123'.isalnum()
True
>>> 'abc123!@#'.isalnum()
False
>>> ''.isalnum()
False
>>> ' '.isalnum()
False
from the Python docs
See Also
No see-alsos for builtins/str.isalnum
0 Notes
No notes for str.isalnum