Skip to content
Advertisement

Print all variables in a class? – Python

I’m making a program that can access data stored inside a class. So for example I have this class:

JavaScript

So using this I can call out a single variable like:

JavaScript

But if I wanted to print all variables, I’m a little lost.

If I run:

JavaScript

I get:

JavaScript

But I want to be able to print the actual data of those.

How can I do this?

Thanks in advance!

Advertisement

Answer

JavaScript
Advertisement