Flipkart Interview Question | What is the meaning of Python being zero-ind exed language?

Question

Python

in progress 0
TheDataMonk 4 years 4 Answers 987 views Grand Master 0

Answers ( 4 )

  1. 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.

  2. Sorry it a private answer.

  3. 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.

  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.

Leave an answer

Browse
Browse