Skip to content

Instantly share code, notes, and snippets.

@akirap3
Created November 28, 2020 05:07
Show Gist options
  • Select an option

  • Save akirap3/700c25e8bea4a8e39c92d4db50ffb980 to your computer and use it in GitHub Desktop.

Select an option

Save akirap3/700c25e8bea4a8e39c92d4db50ffb980 to your computer and use it in GitHub Desktop.
def tosliceMatrix(testList):    
    slicedMatrix = []
    for i in range(9):
        temp = []
        for j in range(3):
            temp.append(testList[i][3*j:(j+1)*3])
        slicedMatrix.append(temp)
    return slicedMatrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment