It's best to use a set and also generator expressions like this
exclude_set = set(exclude_list)
print [f for f in main_list if not (f.order_id in exclude_set)]
Gribouillis
Posting Maven
2,786 posts since Jul 2008
Reputation Points: 1,044
Solved Threads: 691