Python’s Built-in Data Types
Python’s built-in data types are fundamental building blocks used to store and manipulate different kinds of data. Each data type serves a distinct purpose and has specific operations associated with it.
Here’s an overview of the key built-in data types in Python. These built-in data types form the foundation for most Python programs, enabling powerful and flexible ways to store, manipulate, and interact with data.
-
bytearray
A mutable array of bytes. -
bytes
An immutable sequence of bytes. -
complex
A complex number. -
dict
A mutable collection of key-value pairs. -
float
A floating-point number. -
frozenset
An immutable collection of unique and hashable objects. -
int
An integer number. -
list
A mutable sequence of objects. -
object
A generic and emtpy object. -
range
An immutable range of integer numbers. -
set
A mutable collection of unique and hashable objects. -
str
An immutable sequence of characters. -
tuple
An immutable sequence of objects.