+ 3
About index
Can you help me out with python indexes? You can give me examples of codes just to understand well.
3 Respostas
+ 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
Python indexes.
+ 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... ;)