I have difficulty understanding how should I solve the following problem.
I would like to sum every "n" elements in a list in the consecutive order. For example:
n = 2
seq = [2, 2, 1, 3]
res = [4, 3, 4]
How can I apply certain condition (such as a sum) on every n elements of a list? I do not want to import any special libraries because it will help me to understand the basics.