a = ["test","test2","test3"] b = ["False","True"] c = [] for a in listA: for b in listB: if b == True: c.append("dummy") # # print len(c)