On 9/2/07, Zentrader <[EMAIL PROTECTED]> wrote: > > On Aug 30, 11:23 am, [EMAIL PROTECTED] wrote: > > Neil, Steve, > > > > Thanks for the responses on sets. I have not used them before and was > > not even aware Python had them. I will try them out. > > And if there weren't sets you would still not use find or index but a > brute force method or dictionaries > for each in dir_a_list : > if each not in dir_b_list : > print each, "not in dir_b" >
This is O(N_a * N_b)... unless the list are always small, it's definitely better (if one is decided not to use sets) to use dictionaries :-) bye francesco
-- http://mail.python.org/mailman/listinfo/python-list