Creating variables
A variable is a name that refers to a value. You assign with =.
name = "Aarav"
age = 21
print(name, age)Common types
int (whole numbers), float (decimals), str (text), bool (True/False). Python detects the type automatically.
pi = 3.14 # float
is_on = True # bool
city = "Delhi" # strType checking
Use type(x) to see what type a value has.
print(type(42)) # <class 'int'>
print(type("hi")) # <class 'str'>