§ 2.2section 2 of 18·~4 min
Variables and data types
A variable is a name that points at a value. Python works out the type from the value itself, so you never declare it.
order_id = 1042 # int
amount = 499.0 # float
city = "Bengaluru" # str
is_paid = True # bool
coupon = None # no value yet
print(type(amount))
OUTPUT
<class 'float'>The next two sections cover the core types and how to convert between them. Conversion matters more than it sounds: data from files and APIs almost always arrives as text.