def chunk_list(lst, n) -> list: for i in range(0, len(lst), n): yield lst[i:i + n]