check a type in python code example
Example 1: identify object python
print(type('string'))
# <class 'str'>
print(type('string') is str)
# True
Example 2: check type of variable in python
str = "Hello"
type(str)
print(type('string'))
# <class 'str'>
print(type('string') is str)
# True
str = "Hello"
type(str)