I want to zip two lists. For example:
a = ['a', 'b', 'c', 'd']
b = [0, 2, 1, 4]
And I have to left in the list only objects that don't match with 0
.
So for lists a
and b
I have to get list c
:
c = ['b', 'c', 'd']
How can I do this with python? I tried using loop, but it works too long. Maybe I have to use zip()
method, but I don't know exactly how to use it :(