Re: Better way to negate a boolean list?

2008-02-10 Thread David Trémouilles
ay! Most important for me was to understand the strange "not" behavior. Thanks again, David Gary Herron a écrit : > David Trémouilles wrote: >> Hi, >> >> Is there any better (shorter) way to negate a boolean list than: >> >>> negated_boole

Better way to negate a boolean list?

2008-02-09 Thread David Trémouilles
Hi, Is there any better (shorter) way to negate a boolean list than: >>> negated_boolean_list = [not elem for elem in boolean_list] ? I tried: >>> map(not, boolean_list) but it seems that "not" is not a function. Thanks in advance, David -- http://mail.python.org/mailman/listinfo/python-li