How do you think of two pieces of code snippets in Python?
for a in aa:
if a in nb:
intsct.append(a)
nb.remove(a)
what if the code snippet over is rewritten as following?
[intsct.append(a) or nb.remove(a) for a in aa if a in nb]
Although both of them gives me the same result, which one is better in terms of code practices in Python? If compactness is emphasized, can I go for the second one?