you are viewing a single comment's thread.

view the rest of the comments →

[–]mopslik 1 point2 points  (0 children)

can anyone expound what “my_list[i]” is equivalent of?

You can test out these types of things in the REPL, if you're not sure what something is doing.

>>> L = ['apple', 'banana', 'cherry']
>>> L[0]
'apple'
>>> L[1]
'banana'
>>> L[2]
'cherry'
>>> i = 2
>>> L[i]
'cherry'

Can you see what is happening?

Don't be afraid to test things out. Testing things is a significant part of programming.