>>> definitions =
{'name':'dipo','food':'spaghetti','age':30,'location':'lagos'}
>>> definitions.keys()
['food', 'age', 'name', 'location']
>>> definitions.values()
['spaghetti', 30, 'dipo', 'lagos']
>>>You can do this to get what you want. Hope it helps. On Tue, Oct 25, 2011 at 2:54 PM, <[email protected]> wrote: > Sure, > > mydict = {'a':1, 'b',2} > for key in mydict: > print key > > Hope this helps, > Bodsda > Sent from my BlackBerry® wireless device > > -----Original Message----- > From: ADRIAN KELLY <[email protected]> > Sender: [email protected] > Date: Tue, 25 Oct 2011 13:45:50 > To: <[email protected]> > Subject: [Tutor] printing a key not a value > > _______________________________________________ > Tutor maillist - [email protected] > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > > _______________________________________________ > Tutor maillist - [email protected] > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- Elegbede Muhammed Oladipupo OCA +2348077682428 +2347042171716 www.dudupay.com Mobile Banking Solutions | Transaction Processing | Enterprise Application Development
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
