check type of instance python code example
Example 1: isinstance several variables
'check if variables days, months or years are all integers
if not all(isinstance(i, int) for i in [days, months, years]):
Example 2: check type of variable in python
str = "Hello"
type(str)