[EMAIL PROTECTED] writes: > Let's say I have two lists: > > a = [0, 1, 0, 1, 1, 0] > b = [2, 4, 6, 8, 10, 12] > > I want a list comprehension that has the elements in b where a[element] > == 1. > > That's to say, in the example above, the result must be: [4, 8, 10] > > Any hints?
What have you already tried, and how is it insufficient? -- \ "Unix is an operating system, OS/2 is half an operating system, | `\ Windows is a shell, and DOS is a boot partition virus." -- | _o__) Peter H. Coffin | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list