Share
Flipkart Interview Question | What is the meaning of Python being zero-ind exed language?
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Answers ( 4 )
Python is zero indexed language means that the indexes in python for any sequence starts with 0. Here sequence could be any iterable like list, set, tuple, etc. which is used to store elements.
Sorry it a private answer.
Python being a zero indexed language : it means that every iterable object in python starts from index 0 rather than starting from index 1.
For example if we run a for loop like this:
for i in range(0,5):
print(i)
The output will be 0,1,2,3,4. Here we can see that python starts from 0 ends at 4.
Python being zero-indexed language means that if you have an iterable sequence,
you can access the first element starting from 0.
Example you have a list
list1 = [3,4,8,9]
list1[0] will give you 3.