Skip to content

Glossary: Algorithms Beyond the Basics

Slice

Also written: slicing, [:], [::5]

A way to take part of a list with `list[start:stop:step]`. `[:]` copies a whole list and `[::5]` takes every fifth item.

Where the book teaches it

Related terms

Copy (of a list)