Konwertuj listę na listę list na każdym Pythonie

n = 5
my_list_of_lists = [my_list[i:i + n] for i in range(0, len(my_list), n)]
Anxious Alligator