🌐 AI搜索 & 代理 主页
Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gh-106318: Add example for str.isalnum()
  • Loading branch information
adorilson committed Aug 8, 2025
commit 427214ee49f8a24bfde851eeeddb332ea28ba654
10 changes: 10 additions & 0 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1980,6 +1980,16 @@ expression support in the :mod:`re` module).
of the following returns ``True``: ``c.isalpha()``, ``c.isdecimal()``,
``c.isdigit()``, or ``c.isnumeric()``.

For example::

>>> ''.isalnum()
False
>>> 'abc123'.isalnum()
True
>>> 'abc123!@#'.isalnum()
False
>>> ' '.isalnum()
False

.. method:: str.isalpha()

Expand Down