Native Data Structures#
So far, we have only worked with elementary data types in Python:
Integer
Float
Booleans
Strings
None
Variables of elementary data types hold a single value at a time.
Data Structures, as the same suggests, are structures designed for organizing, processing, manipulating, retrieving and storing Data
Most programming languages provide a set of native data structures to:
Facilitate commmon programming tasks
Improve programming efficiency for the programmer
Improve time and memory efficiency through optimized internal implementations
Python’s native data structures that we’ll cover in this class will include:
Lists
Sets
Tuples
Dictionaries
We will cover our first Data Structure in this lecture: Lists
Lists are used to store multiple values in a single variable.
List items are:
Ordered
Changeable
Allow duplicate values
List items can be of any type:
int
,float
,bool
,str