How can i retrieve a key from a dictionary?

Husam h.jehadalwan at student.kun.nl
Sun Nov 4 05:35:12 EST 2001


how can one retrieve or select a key from a dictionary?

dict={}
dict[1]='one'
dict[2]='two'

dict.keys() will gets all the keys. but, i need to select explicitly one
key for printing along its value.

thanks in advance.





More information about the Python-list mailing list