How to get the 'name' of an int

Hans Brand Hans.Brand at BrandInnovators.com
Fri Feb 28 10:35:35 CET 2003


Hi,

I would like to get the 'name' of a variable to do something like this:

causea = 12
causeb = 13
for cause in (causea, causeb):
    print "%s = %s" %(name(cause), cause)

The result should be:
causea = 12
causeb = 13

How can I achieve this?

Thanks, Hans






More information about the Python-list mailing list