A data type is a classification of data that defines what kind of value a variable can hold in a programming language. It determines how the data is stored in memory and what operations can be performed on it.
int
) – Whole numbers (e.g., 10
, -3
, 1000
)float
) – Decimal numbers (e.g., 3.14
, -0.5
, 2.71
)str
) – Text or sequences of characters (e.g., "hello"
, 'Python'
)bool
) – True/False values (True
, False
)list
) – Ordered collection of elements (e.g., [1, 2, 3]
, ["apple", "banana"]
)tuple
) – Immutable ordered collection (e.g., (1, 2, 3)
)dict
) – Key-value pairs (e.g., {"name": "Alice", "age": 25}
)set
) – Unordered collection of unique elements (e.g., {1, 2, 3}
)