What is a Python List?
What is a Python List? A Python List is the most common and versatile data structure in Python. It is one of the six built-in types of sequences in Python language. Each item in a Python list is separated by comma (,) and are enclosed in square brackets (). It can have any number of items and they may be of different types (integer, float, string etc.). A list can even hold other data structures like dictionaries or objects like functions, etc.
What is a Python Dictionary?
What is a Python Dictionary? Python Dictionary is a data-structure in Python that is also known as associative array. A python dictionary is used to store data values in key:value pair. Each item has a key and a corresponding value that is expressed as a pair (key: value). They are optimised to retrieve values when the key is known.