When to use a tuple vs list vs dictionary in Python?

Technology CommunityCategory: PythonWhen to use a tuple vs list vs dictionary in Python?
VietMX Staff asked 3 years ago
  • Use a tuple to store a sequence of items that will not change.
  • Use a list to store a sequence of items that may change.
  • Use a dictionary when you want to associate pairs of two items.