0 out of 68 challenges solved

Partition a sequence into sublists

def partition(n, step, seq):
    Partitions the sequence into sublists of n elements, stepping forward step steps each time.

    n: The number of elements in each sublist.
    step: The number of steps to move forward each time.
    seq: The input sequence.

    list: The list of sublists.
    # TODO: Implement the partition function