Janusz
Janusz

Reputation: 189594

How do I access the name of the class of an Object in Python?

The title says it mostly.

If I have an object in Python and want to access the name of the class it is instantiated from is there a standard way to do this?

Upvotes: 2

Views: 250

Answers (1)

Benji York
Benji York

Reputation: 2050

obj.__class__.__name__

Upvotes: 19

Related Questions