Answers for "how to check if datatype is string python"

13

if type is string python

isinstance(s, str)
Posted by: Guest on March-22-2020
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

Code answers related to "how to check if datatype is string python"

Python Answers by Framework

Browse Popular Code Answers by Language