The default string representation for a dictionary seems to be just right:
>>> a={3: 'foo', 17: 'bar' }
>>> a
{17: 'bar', 3: 'foo'}
>>> print a
{17: 'bar', 3: 'foo'}
>>> print "a=", a
a= {17: 'bar', 3: 'foo'}
Not sure if you can get at the "variable name", since variables in Python are just labels for values. See this question.