Thursday, May 2, 2019

python - Compare type of a variable

I have a variable x and whose type is :




type(x)
>>


in the next part, I want to see if the type of x is
I am unable to compare and see it
So far, I have tried:



if type(x) == "__main__.XmlListConfig":



This does not work because ofcourse I am comparing it to a string.
Any Suggesting will help and please feel free to ask me for more clarification.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...