First page Back Continue Last page Overview Graphics

Variables in Python

Variables don't have to be declared and

CAN'T BE declared!

int x

float y

There is a data type in Python, but it is

bound to the value and not to the variable.

This means, that the type of the variable may

change during execution.

i = 42 # data type is integer(implicit)

i = 42 + 0.11 # type will be changed to float

i = "fourty" # and now to a string

NOTHING

TO DECLARE

X