Compound Data Types
We'll cover the following...
We'll cover the following...
Compound data types
Compound data types are data types that can hold different types of values together. They are basically composed of other data types, such as lists, for instance.
Lists
Lists (list): Ordered and mutable collections of items. The elements inside can be of different data types.
Let's define another list with various data types stored in it.
Tuples
Tuples (tuple): Ordered and immutable collections of items. The elements inside can be of different data types.
Let's define another tuple with various data types stored in it.
Dictionaries
Dictionaries (dict): Unordered collections where each item is represented as a key-value pair. All keys are unique.
Sets
Sets (set): Unordered collections of unique elements.