Creating sub-lists
The function will divide the original list into a number of sub-lists according to the provided number N, each sub-list should have N elements.
Sample Code:
def arrNested(l,n):
# Enter your logic here...
Examples:
Input: [1,2,3,4,5,6],2
Output: [[1,2],[3,4],[5,6]]
Explanation: Each sub-lists have 2 elements.
Input: [1,2,3,4,5,6],3
Output: [[1,2,3],[4,5,6]]
Explanation: Each sub-lists have 3 elements.