Module 5
Reading list elements
Accessing items by index.
Getting one item
Just like with strings, you can access list items using an index in square brackets.
Python
samples = ["control", "treatment", "blank"] print(samples[0]) print(samples[-1])
→ control
blank
Your task
Read list elements
- Print the first and last element of the list.