I want to convert this loop to a list comprehension but I'm stuck (A,B,C and D) are lists:
x = 0
for i in A:
if i in B:
if C[x] == D[x]:
x = x + 1
This is what I have so far:
[if i in A for i in B]
Not sure where to go from here. Any help will be appreciated.