Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (120 points)
What does [0] represent in python ? anyone please help me...

1 Answer

0 votes
by (26.4k points)
edited by

Let me say, I have an array with some values

>>>a=['Sachin','Dhoni','Virat','Raina']

If I want to access the first element in that array, we can use '[0]'. 

>>>a[0]

'Sachin'

>>>a[1]

'Dhoni'

So, a[0] will access the first element of the array.

Do you want to be a Python Expert? Just come and join the Python course

To know more related about this topic, you can also at the following video tutorial:

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...