Hi I am a beginner to python and I have an exam tomorrow. I do not know how to do this question. I know that I have to use a nested for loop but, I cannot make it work syntactically. Here is the question, I apologize for any formatting errors.
(list of int, int) -> list of (list of int)
Return a list of lists of elements from 1st, where each sublist is the next num elements from 1st. If the length of 1st is not a multiple of num, the final sublist will have fewer than num elements.
»> make_rows([2. 4, 6, 8, 10, 12],3) #Function call
[[2, 4, 6], [8, 10, 12]] # expected output