# split list equally def list_split(l, size): # size = (len(l) / x if len(l) % x == 0 else len(l) / x + 1) return [l[m:m + size] for m in range(0, len(l), size)]