What are negative indexes and why are they used?

By ayush goel in 22 Sep 2023 | 04:08 pm
ayush goel

ayush goel

Student
Posts: 346
Member since: 21 Sep 2023

What are negative indexes and why are they used?

22 Sep 2023 | 04:08 pm
0 Likes
divas goyal

divas goyal

Student
Posts: 453
Member since: 22 Sep 2023

Negative Indexes:

  • Negative indexes in Python are used to access elements from the end of a sequence. -1 refers to the last element, -2 to the second-to-last, and so on.
22 Sep 2023 | 06:36 pm
0 Likes

Report

Please describe about the report short and clearly.