List and tuple

A list is an ordered, changeable collection; a tuple is the same but fixed.

Also called: tuple, slice, index, append

Domain
Languages
Type
Term
Source
General
Language
Python

In plain English

Indexes start at 0, negative indexes count from the end, slices take a part.

Example

The script keeps the languages in a list: ["en", "de", "es"].

In code

langs = ["en", "de", "es"]
langs.append("id")
langs[0], langs[-1], langs[1:3]      # 'en', 'id', ['de', 'es']
point = (8.65, 115.21)               # tuple

Related terms

Added 2026-11-30 · Last reviewed 2026-11-30