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 <type 'my.object.kind'>?
my.object.kind? Are you trying to get the types of all the elements of the list?isinstance()is the python built-in-function that you're looking for. docs.python.org/2/library/functions.html#isinstance