• About
  • Images
  • Blog
  • Talks
  • Contact
Menu

Roberto Reif

Technology and Data Trainings

Your Custom Text Here

Roberto Reif

  • About
  • Images
  • Blog
  • Talks
  • Contact

PYTHON LISTS: Indexing

May 13, 2025 Roberto Reif

When working with Python lists, we can use indices to extract specific elements. Python is zero-indexed, meaning the first element of the list has an index of zero. To extract an element, we use square brackets “[…]” next to the list, specifying the desired index. Indices also work in reverse: for example, an index of -1 refers to the last element in the list. However, using an index outside the range of the list will result in an error.

What other Python questions do you have?

← Avoid DistractionsA Year From Now, You Will Wish You Had Started Today →