Python for Biologists
Lectures
Labs
Resources
Assessment
Schedule
About
GitHub →
← Lab 2
Lists —
collections of data
Reaching in
▸
Make one: genes = ["BRCA1", "TP53", "EGFR"]
▸
Index by position: genes[0] (first), genes[-1] (last)
▸
Slice a range: genes[1:3] — end not included
Changing & summarising
▸
Grow: genes.append("MYC") / genes + more
▸
Edit by position: genes[1] = "KRAS" / del genes[0]
▸
Numbers: sum(values) / len(values) → the mean
📓 01 · Lists — practice notebook →
← Previous
←
Next →
→