# Creating variables of different types
num = 10
text = "Hello, world!"
lst = [1, 2, 3]
# Checking the types of the variables
print(type(num)) # int
print(type(text)) # str
print(type(lst)) # list
<class 'int'>
<class 'str'>
<class 'list'>
num
`), a string (`text
`), and a list (`lst
`). We then use the `type
` function to verify the type of each variable and output the results using the `print
` function.type
` function returns the data type of the object that it is passed as an argument. In this program, we pass the variables `num
`, `text
`, and `lst
` to the `type` function, which returns the types `int
`, `str
`, and `list
`, respectively.type
` function to verify the types of any objects in your Python program, including variables, functions, and modules. This can be useful when debugging your code or when working with libraries or external code that you're not familiar with.