About index | Sololearn: Learn to code for FREE!

+3

About index

Can you help me out with python indexes? You can give me examples of codes just to understand well.

4/16/2020 8:03:58 AM

Aaron Luke Olvida🇵🇭

3 Answers

New Answer

+2

Index is the positional value assigned to any element in an iterable such as string, list, etc. it always start from zero It is used to reach an element with it's address...via typing iterable_name[index] for eg. >>>list = [2,6,1,9,8] >>>print(list[2]) 1

+1

+1

Think to the index of a list as the floor number of a building: the first element is the ground (level 0), the 1st floor is the second element, and so on... ;)