Answers for "check if a variable is a certain type python"

0

how to check if a variable in python is a specific data type

isinstance(variable_name, class_name) #eg. isinstance(age, int) will return True
Posted by: Guest on December-10-2020
0

how to check if variable in python is of what kind

kind = "World"
print(type(kind))
kind2 = 0876
print(type(kind2))
Posted by: Guest on September-24-2021

Code answers related to "check if a variable is a certain type python"

Python Answers by Framework

Browse Popular Code Answers by Language