meta data for this page
  •  

collections

  • List [ “abc”, 1, True ]
    • ordered, indexed, allow duplicate items
    • mutable
    • list item can be any type
  • Tuple ( 1, “A”, True)
    • ordered, indexed, allow duplicate items
    • immutable
    • tuple item can be any type
  • Set { “abc”, 34, True }
    • unordered, unindexed, no duplicate items
      • 1 and True (and 0/False) are the same items (duplicates)
    • items are immutable
    • set is mutable (add/remove items)
    • set item can be any type
  • Dictionary { “keyA”: value, “keyB”: value }
    • stores key:value pairs
    • ordered (from v3.7), no duplicate items (keys)
    • mutable
    • value can be any type