Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stevenrouk/a799b5cc85b7f90e1a4d53fbea6dc0ea to your computer and use it in GitHub Desktop.
Save stevenrouk/a799b5cc85b7f90e1a4d53fbea6dc0ea to your computer and use it in GitHub Desktop.
A skeleton of a function that returns the result of the matrix multiplication of two matrices using a list comprehension.
def list_comp_matrix_multiplication(A, B):
# First, we could check to make sure the matrices can be multiplied together.
#
# (code here)
# Then, we could return the matrix multiplication using a list comprehension.
#
return [ # some list comprehension here ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment