def rowmul(matlist, index, k, K):
 for i in range(len(matlist[index])):
  matlist[index][i] = (k * matlist[index][i])
 return matlist

def rowmul ( matlist , index , k , K ) : for i in range ( len ( matlist [ index ] ) ) : matlist [ index ] [ i ] = ( k * matlist [ index ] [ i ] ) return matlist
multiplies index row with k .