Discussion Forum | Board Infinity

What are list and dictionary

Python, List

A list, in Python, stores a sequence of objects in a defined order. They allow indexing or iterating through the list. Next, lists are mutable which you can modify after creation.

A dictionary is an associative array of key-value pairs. It’s unordered and requires the keys to be hashable. Search operations happen to be faster in a dictionary as they use keys for lookups.