From 7b0886b0f2fad3fdd4966faee97c9730da66b808 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Mon, 2 Feb 2026 22:18:08 +0000 Subject: [PATCH] gh-106318: Add a successful example for str.index() method --- Doc/library/stdtypes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index ce0d7cbb2e4276..2435f074f052d0 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2163,6 +2163,8 @@ expression support in the :mod:`re` module). .. doctest:: + >>> 'spam, spam, spam'.index('spam') + 0 >>> 'spam, spam, spam'.index('eggs') Traceback (most recent call last): File "", line 1, in