How do i check for type of a variable in python?

You can use the `type()` function to check the type of a variable in Python. Example:

x = 5
print(type(x))  # 
The above code checks and prints the type of the variable `x`.

Beginner's Guide to Python