Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 


Why we use negative indexes in Python?
Question Posted on 10 May 2022

Home >> Python Programming >> Python Questions >> Why we use negative indexes in Python?




Why we use negative indexes in Python?
In order to access elements from any of order sequence we mainly used index of element which is position number of particular element. And this index usually starts from 0 for the first elements and 1 for second one and so on.



Negative Index

And when we use index to access elements from end of the list then it is called reverse indexing. And in this reverse indexing the indexing elements starts from last element with the index number "-1". And the second last elements has index "-2" and so on. And these indexes used in reverse indexing are called negative indexes.
0
0



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
Program to check sequence is palindrome or not?
Can you define Memory Management in Python?
Can you define dictionary in Python?
Can you please mention some builtin Data Types in Python?
Write a code to read JSON file and print data of JSON in Python?






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |