]) fetches components at offsets:
The first item is at offset 0.
Negative indexes mean to count backward from the end or right.
Sfetches the first item.
S[−2]fetches the second item from the end (like
A short summary on indexing and slicing. Useful for a quick glance to revise these concepts.
Share this highlighthttp://www.safaribooksonline.com/a/learning-python-5th/28866/