Skip to content

The first three letters

The first three letters

word is "python". Store its first three characters in part using a slice.

⚠️ A slice stops before its second number. word[:3] gives three characters — positions 0, 1, 2 — and never position 3. So the number you write is the COUNT you want, not the last position.

Log in or create account

IGCSE, A-Level & AP