+ 11
What does vars() do in python?
How to use vars()? What does vars() do? Where to use it?
1 Answer
+ 7
vars() function in Python
It takes an object as a parameter which may be can a module, a class, an instance, or any object having __dict__ attribute. The method returns the __dict__ attribute for a module, class, instance, or any other object if the same has a __dict__ attribute