I want to make a function in Python that will print information about a variable given to it elegantly. If I did this for dictionaries, I might command and receive
>> dict1 = {'r':5,'t':3}
>> prettyPrint(dict1)
dict1 is a dictionary with entries:
r: 5
t: 3
But I'm having difficulty finding any straightforward way of extracting the name that an input variable had in the system before it was given to a function.
Some questions have come close to asking what I'm wondering about, but the answers on Variable name to string in Python either make use of not actually needing what I'm asking for or confess to being bad practice.