Interesting (?) problem
jeanmichel at sequans.com
Mon Jan 11 18:48:35 CET 2010
> Incidentally, it *seems* that list comprehension preserves order:
> hostips_limited = [ h for h in hostips if h in thread_results ]
> Empirically speaking it seems to work (I tested it on real ips), but
> please correct me if that's wrong.
Sounds good to me.
List are *ordered* items ; it does not suprise me that list
comprehension consistently keep the order.
More information about the Python-list