Understand how to store and work with different types of data in Python.
A variable is a named container that stores a value. In Python, you create a variable by assigning a value to a name using the = operator.
# Creating variables
name = "Alice"
age = 25
height = 5.7
is_student = True
print(name) # Alice
print(age) # 25
print(height) # 5.7# Check the type of a variable
name = "Alice"
age = 25
pi = 3.14159
is_active = True
print(type(name)) # <class 'str'>
print(type(age)) # <class 'int'>
print(type(pi)) # <class 'float'>
print(type(is_active)) # <class 'bool'>Python is dynamically typed — you do not need to declare the type of a variable. Python figures it out automatically.
What type is the value 3.14 in Python?