print names of dictionaries

BartlebyScrivener rpdooling at gmail.com
Wed Apr 26 17:10:18 EDT 2006


Still new. Learning attributes and functions and so on.

Sorry if this is obvious, but if I'm defining a function for some
dictionaries, how can I print just the names of the dictionaries?

E.g. assuming apps, dirs, sites are dictionaries defined in the module,
how can I print just their names before doing other things with them.

def printdict(dicts=[apps, dirs, sites]):
       for dict in dicts:
              print ???

Thank you

rpd




More information about the Python-list mailing list