typo exemple d'indexation

Open Beginner friendly
#34 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
documentation

Research direction

Open the course section “Structures de données 1/Listes et Tuples/Listes/Indexation” and review the examples for c[2][0] and b[1:]. Check the indexing explanations against Python’s list behavior, then correct any confirmed wording or code errors; done means both examples and their comments are consistent.

Written by the indexing model from the issue text.

Description

copie du commentaire laissé sur le repo linogaliana
python-datascientist : https://github.com/linogaliana/python-datascientist/issues/681#issue-4137637762

Bonjour et merci pour ce cours très clair et très progressif.

Est-ce un défaut de compréhension de ma part ou y-a-t-il une coquille dans l'exemple suivant (Structures de données 1/Listes et Tuples/Listes/Indexation) :

# Premier élément de la sous-liste qui est à la deuxième position de la liste c
print(c[2][0])

--> ce code ne retourne-t-il pas le premier élément de la sous liste à la troisième position (index 2). le code correct ne devrait il pas être :
print(c[1][0]
?

de même dans le paragraphe suivant :

# Tous les éléments à partir de la 1ère position
print(b[1:])

ne devrait-ce pas être :
print(b[0:])
?

Cordialement

Emmanuel

Dominant language
Python
Stars
3
Forks
9
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from InseeFrLab/formation-python-initiation

All issues in InseeFrLab/formation-python-initiation

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.