Let's say I have 2 RDDS:
rdd1 = [a, b, c, d]
rdd2 = [[], [a, d], [a, e], [c]]
Now let's say I want to filter the second rdd so that it only contains elements in rdd1. so after filtering it should look like
rdd2 = [[], [a, d], [a], [c]]
Nex. I want to combine them into one list like this
[[a, []], [b, [a, d], [c, [a]], [d, [c]]
How do I do this in Python?