Get keys from a dicionary

macm moura.mario at gmail.com
Fri Nov 11 08:31:35 EST 2011


Hi Folks

I pass a nested dictionary to a function.

def Dicty( dict[k1][k2] ):
	print k1
	print k2

There is a fast way (trick) to get k1 and k2 as string.

Whithout loop all dict. Just it!

Regards

macm



More information about the Python-list mailing list