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 cfeede8 commit 3dd7a3cCopy full SHA for 3dd7a3c
Doc/library/stdtypes.rst
@@ -2180,7 +2180,18 @@ expression support in the :mod:`re` module).
2180
Return ``True`` if all characters in the string are alphanumeric and there is at
2181
least one character, ``False`` otherwise. A character ``c`` is alphanumeric if one
2182
of the following returns ``True``: ``c.isalpha()``, ``c.isdecimal()``,
2183
- ``c.isdigit()``, or ``c.isnumeric()``.
+ ``c.isdigit()``, or ``c.isnumeric()``. For example::
2184
+
2185
+ .. doctest::
2186
2187
+ >>> 'abc123'.isalnum()
2188
+ True
2189
+ >>> 'abc123!@#'.isalnum()
2190
+ False
2191
+ >>> ''.isalnum()
2192
2193
+ >>> ' '.isalnum()
2194
2195
2196
2197
.. method:: str.isalpha()
0 commit comments