+ 11

What does vars() do in python?

How to use vars()? What does vars() do? Where to use it?

26th Oct 2020, 11:36 AM
Si Thu Tun
Si Thu Tun - avatar
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
26th Oct 2020, 11:38 AM
Alphin K Sajan
Alphin K Sajan - avatar