Multiply off diagonals in a square matrix in python

would anyone know how to multiply the off diagonals of a square matrix by a number, in python. Many thanks