I want to create new lists from one list. This the example list I am working on:
matrixlist = [['Matrix', '1'], ['1', '4', '6'], ['5', '2', '9'], ['Matrix', '2'], ['2', '6'], ['1', '3'], ['8', '6'], ['Matrix', '3'], ['5', '6', '7', '9'], ['1', '4', '2', '3'], ['8', '7', '3', '5'], ['9', '4', '5', '3'], ['Matrix', '4'], ['7', '8'], ['4', '6'], ['2', '3']]
I split them like this with for loop:
matrix1 = [['1', '4', '6'], ['5', '2', '9']]
matrix2 = [['2', '6'], ['1', '3'], ['8', '6']]
matrix3 = [['5', '6', '7', '9'], ['1', '4', '2', '3'], ['8', '7', '3', '5'], ['9', '4', '5', '3']]
matrix4 = [['7', '8'], ['4', '6'], ['2', '3']]
But I want to give the long list to program and it create lists and append the relevant elements in it. Like matrix 1 elements in matrix1 list.
Edit: I can't use any advanced built-in function. I can only use simple ones (like append, pop, reverse, range) and my functions in code.
matrixList[0], the secondmatrixList[1], and so on.