Posts: 453
Threads: 16
Joined: Jun 2022
May-17-2023, 09:52 PM
(This post was last modified: May-17-2023, 09:52 PM by rob101.)
As a bit of an explainer on indexing:
position: | 0 | 1 | 2 | 3 | 4 |
data: | a | b | c | d | e |
- position: | -5 | -4 | -3 | -2 | -1 |
The above shows how any indexed object (of which a list object is one example) can be accessed.
For example:
list_data = ['a', 'b', 'c', 'd', 'e']
string = 'abcde'
... to name but two.
Sig:
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein