## create chunks of lists def chunks(l:list, n:int)->list: n = max(1, n) return list(l[i:i+n] for i in range(0, len(l), n))