> If you want only "search and found" element, look dictionnary ; if you
> want also to have the order, see the module set.
Erg - no. Sets are mathematically defined as having no order.
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list
Hi !
If you want only "search and found" element, look dictionnary ; if you want
also to have the order, see the module set.
Good night
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
The data structure you want to use is a dictionary - known as hashmap or
hash or map in other languages. Lets say you have a few objects of type
town that you want to access using their zip, then things could look like
this:
class Town(object):
def __init__(self, zip, cool_clubs):
I wanted to make a list index work as the index of the data in the
database. something like
database:
idx
item_description
item_value
being imported to my program as:
x[idx][0]= item_description
x[idx][1]= item_value
the problem is that there will be some hundred items and possible the
idx wil v