Programming in Python
0 of 222 complete

Section 10: Tuples · Notes

Section notes

  • A tuple is like a list but cannot be changed, such as (1, 2).
  • You can assign several variables at once: x, y = 1, 2.
  • sorted() with items() sorts the contents of a dictionary.
  • Tuples compare element by element, which makes sorting data easy.

Your progress is saved in this browser. Accounts are coming so it follows you across devices.