Python - Variables

Izolipe Logo
Python pixel-art

Python doesn’t use keywords like ‘let’ or ‘var’; it uses a name/value structure for variables.


Assignment

name = "value"

A variable is created using the assignment operator (=), with the variable name on the left-side and the value on the right-side.


Mutability

Python variables (or names) store references to values, meaning you can assign/reassign them any value of any type.

x = 22 # <- int
x = (1, True, 'Hi!') # <- tuple
CC0 1.0 Universal; Felipe Izolan;