How-to-filter-a-list-based-on-another-list%26%23x27%3bs-valuesFor example, I have two lists of the same length:
a = [[1,2],[2,2],[3,3],[4,2],[5,6]]
b = [1,2,2,3,1]
I want to have a function such that
func(a,b,1) = [[1,2],[5,6]]
func(a,b,2) = [[2,2],[3,3]]...