How to check if variable is a specific class in python?
I have a variable "myvar" that when I print out its type(myvar)
the output is:
<class 'my.object.kind'>
If I have a list of 10 variables including strings and variables of that
kind.. how can I construct an if statement to check whether an object in
the list "mylist" is of ?
No comments:
Post a Comment