Skip to content

Improve language of list.index in tutorial #107194

Description

@pulsar17

Documentation

The first sentence of list.index (https://docs.python.org/3/tutorial/datastructures.html) reads:

Return zero-based index in the list of the first item whose value is equal to x.

A similar desription of the index method but in the context of Common Sequence Operations (https://docs.python.org/3/library/stdtypes.html#common-sequence-operations):

s.index(x[, i[, j]]) index of the first occurrence of x in s (at or after index i and before index j) (8)

As a non-native English speaker, the latter description reads more clearly.

Suggestion

Return zero-based index of the first item whose value is equal to x in the list.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc direasy

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions