Multiple equates

jzakiya jzakiya at mail.com
Mon Nov 17 13:50:49 EST 2008


I looked online and in books, but couldn't find a definitive answer to
this.

I have an array and set multiple elements to either True or False at
one time.

Question: Which way is faster (or does it matter)?

1)

array[x1]=array[x2]=........= array[x10] = \
array[x11]=array[x12]=... = array[x20] = \
......
......
array[x40]=array[x41]=....= array[x50] = False (or True)


2)

array[x1]=array[x2]=........= array[x10] = False
array[x11]=array[x12]=... = array[x20] = False
......
......
array[x40]=array[x41]=....= array[x50] = False




More information about the Python-list mailing list