Python Notes Help

Data Types

Data Type

Description

Example

int

Integer numbers

x = 10

float

Floating point (decimal) numbers

y = 3.14

str

Text (string)

name = "John"

bool

Boolean values, True or False

is_active = True

list

Mutable ordered collection*

numbers = [1, 2, 3]

tuple

Immutable ordered collection*

coordinates = (10, 20)

dict

Collection of key-value pairs*

person = {"name": "Alice", "age": 25}

set

Unordered collection of unique elements*

unique_numbers = {1, 2, 3}

NoneType

Absence of a value or a null value

result = None

* Better explained in the next section

Last modified: 17 March 2025