Tarek Amr
unread,Jan 13, 2006, 9:59:22 PM1/13/06Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyth...@googlegroups.com
There are various data types in python, one of them is the dictionary
which is some how similar to a hash table where you acceess the
different entries there by their keys.
For example if we have
>>> d = {"a":"Ali","b":"Robert","c":"Cinthya"}
>>> d["a"]
Ali
>>>d["c"]
Cinthya
Suppose now we want to access these items as if they are in a normal array (d[0],d[1],etc) how can we do that ?
>>> d[d.keys()[0]]
Ali
>>> d[d.keys()[1]]
Robert
etc.
--
Best Regards,
Tarek Amr