Trending Python 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
8 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
1 day 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
3 days ago

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

Veluru venkata sai  Vanipriya's image
Question added by Veluru venkata sai Vanipriya
3 months ago

Is there giving any training of project?‎

How to code in Python language of project‎

Answers:
0
Followers:
Views:
3
Vote Count:
0
Answer should contain a minimum of 25 characters.
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.

Komakula  Ramani's image
Question added by Komakula Ramani
3 months ago
Answers:
1
Followers:
Views:
3
Vote Count:
0
Answer should contain a minimum of 25 characters.