Show all properties of a variable in python (like PHPs var_dump, but better)

“but better” because types are also exposed

from inspect import getmembers
from pprint import pprint

pprint(getmembers(my_variable))

Leave a Reply

Your email address will not be published. Required fields are marked *