We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57aaee5 commit 3f87078Copy full SHA for 3f87078
Doc/library/stdtypes.rst
@@ -1939,7 +1939,18 @@ expression support in the :mod:`re` module).
1939
Return ``True`` if all characters in the string are alphanumeric and there is at
1940
least one character, ``False`` otherwise. A character ``c`` is alphanumeric if one
1941
of the following returns ``True``: ``c.isalpha()``, ``c.isdecimal()``,
1942
- ``c.isdigit()``, or ``c.isnumeric()``.
+ ``c.isdigit()``, or ``c.isnumeric()``. For example::
1943
+
1944
+ .. doctest::
1945
1946
+ >>> 'abc123'.isalnum()
1947
+ True
1948
+ >>> 'abc123!@#'.isalnum()
1949
+ False
1950
+ >>> ''.isalnum()
1951
1952
+ >>> ' '.isalnum()
1953
1954
1955
1956
.. method:: str.isalpha()
0 commit comments