seaching a list...
bruce
bedouglas at earthlink.net
Thu Aug 10 14:45:55 EDT 2006
hi...
i'm playing with a test sample. i have somethhing like:
dog = mysql_get(.....)
.
.
.
such that 'dog' will be an 'AxB' array of data from the tbls
furher in the test app, i'm going to have a list, foo:
foo = 'a','b','c','d'
i'm trying to determine what's the fastest way of searching through the
'dog' array/list of information for the 'foo' list.
should i essentially make dog into A lists, where each list is B elements,
or should it somehow combine all the elements/items in 'dog' into one large
list, and then search through that for the 'foo' list...
also, in searching through google, i haven't come across the list.search
function.. so just how do i search a list to see if it contains a sublist...
my real problem involves figuring out how to reduce the number of hits to
the db/tbl...
thanks
ps. if this is confusing, i could provide psuedo-code to make it easier to
see...
More information about the Python-list
mailing list