Trending Programming Discussions

Follow

Ask the Community


Ask any professional question and get answers from other specialists.

Stream language
jahangir khan's image  
Answer added by  jahangir khan, I.T Support Assistant, Pakistan Air Force
18 hours ago

my_list = [10, 20, 30, 40, 50] print(my_list[-1]) # Accessing the last element: 50print(my_list[-2]) # Accessing the second-to-last element: 40print(my_list[-3]) # Acces ... See More

Mohanesh Barge's image  
Answer added by  Mohanesh Barge, Service engineer, A Square Technosolution, Pune
1 day ago

a negative index is a way to extract elements in a list, tuple, or string by counting from the end of the sequence instead of the beginning

Minal Prindawankar's image  
Answer added by  Minal Prindawankar
1 day ago

Negative indexing in Python is a way to access elements of a list, tuple, or string from the end of the data structure instead of the beginning. 

Imtiyaz Bhat's image  
Answer added by  Imtiyaz Bhat
2 days ago

It is meant for the purpose of Slicing in the python 3.0 at the end of the string.

Nancy Nainan's image  
Answer added by  Nancy Nainan, Technical Specialist, Nokia
2 days ago

Negative Index to reverse the list or access the list in reverse way. fruit = ['a','p','p','l','e'] print(fruit[-1]) --& ... See More

Poti Jyothi's image  
Answer added by  Poti Jyothi
4 days ago

Negative indexing is each traversal moves from tail to head, starting with the last element.

Tnfkdgs Tnfkd's image  
Answer added by  Tnfkdgs Tnfkd, Job Analyst, United Nations Relief And Works Agency For Palestine Refugees In The Near East - Other Locations
4 days ago

Exploring ZoomInfo's pricing structure unveils a tailored approach to acquiring valuable business insights. The true value of ZoomInfo lies in its ability to transfo ... See More

Nehmetallah Ghanem's image  
Answer added by  Nehmetallah Ghanem
5 days ago

Negative Index in python starts counting from the end of the data structure rather than the beginning

Aly  Mtsumi's image  
Answer added by  Aly Mtsumi, Full Stack Sofware Developer, Revolution Analytics
5 days ago

In python the negative index is used to start slicing from the end of the list, -1 would be the last element in the list.