def mulrowcol(row, col, K):
 result = K.zero
 for i in range(len(row)):
  result += (row[i] * col[i])
 return result

def mulrowcol ( row , col , K ) : result = K . zero for i in range ( len ( row ) ) : result += ( row [ i ] * col [ i ] ) return result
multiplies two lists representing row and column element-wise .