Code Lab BetaBUILD. RUN. DISCOVER.
Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
Loading…
Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
Loading…
Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
PYTHON STRUCTURES / CHAPTER 06 / Learn / LESSON 01
Chapter 6 — Structures and algorithms. A tuple is an immutable sequence:
point = (3, 5) x, y = point
That is unpacking — two variables from one tuple. Indexes work too: point[0].
Tuples suit fixed pairs (coordinates, rgb). Lists are better for growing data.
Learn: tuple unpack.
PROFILE IDLE
›