pySohila’s learning labPYTHON / FIELD GUIDE 01

Work with real shapes of data / CORE PATH

Lists, slices & comprehensions

Sequences preserve order, including repeated values.

4h planning budget · Sohila Khaled Abbas · Reviewed 2026-11-01

A list can hold landing records, but it has no enforced table schema.

Understand the idea

Sequences preserve order, including repeated values. A list can hold landing records, but it has no enforced table schema.

Work through the practice with a tiny fixture, predict the result before running it, and record one boundary case. Use the exit check as evidence before moving on.

What to learn

A small original example

records = ["a", "b", "c"]
last_two = records[-2:]
print(last_two)
print(records)  # still intact

Practice on your own data

Task 09: return the last n records without changing the input list.

Practice this lesson in the Python lab →

EXIT CHECK

latest([1, 2, 3], 2) is [2, 3]; n=0 returns []; negative n is invalid.

Common pitfalls

Prerequisites

Loops & accumulation

Boot.dev chapter 9 · 03:44:14 ↗

Video and playlist companions

Choose one explanation for the concept, then attempt the practice. These are topic mappings, not a claim that every linked lesson covers every outcome.

Boot.dev · Python for Beginners

Loads YouTube on request. Open on YouTube ↗ if the owner restricts embedding.

كورس Python منحة ITI

Loads YouTube on request. Open on YouTube ↗ if the owner restricts embedding.

Python Full Course for Beginners (13 Hours) – From Zero to Hero

Loads YouTube on request. Open on YouTube ↗ if the owner restricts embedding.

Sources and further reading

Track progress on this topic → · Markdown source ↗