I found a solution to one of my problem, but I want to optimize it :-
def asd(N, l1, l2): for i in l1: sel = None score = N for j in l2: i