newbie list question

Paul Rubin http
Sat Dec 6 07:03:40 EST 2003


Kamus of Kadizhar <yan at NsOeSiPnAeMr.com> writes:
> I want to remove those elements that are in the sub-lists of fav that
> also appear in the corresponding sub-list of oldfav:
> 
> I can hack this up using C-style indexes, but I have to imagine there
> is some neat python way that eliminates indexes altogether.

Does this work?

difffav = [[f for f in new if f not in old] for new,old in zip(fav,oldfav)]




More information about the Python-list mailing list