Lección 2 de 10
Variables y tipos de datos
En Python creas una variable escribiendo un nombre y asignando un valor con =. No necesitas declarar el tipo: Python lo detecta automáticamente.
Tipos comunes: int, float, str y bool.
PYTHON
name = "Ali" # string
age = 25 # integer
price = 19.99 # float
is_active = True # boolean
print(type(name)) # <class 'str'>
print(type(age)) # <class 'int'>