#!/usr/bin/env python3

import numpy as np

def get_rows(a):
    return list(a)
def get_columns(a):
    return list(a.T)

def main():
    np.random.seed(0)
    a=np.random.randint(0,10, (4,4))
    print("a:", a)
    print("Rows:", get_rows(a))
    print("Columns:", get_columns(a))

if __name__ == "__main__":
    main()

[((11, 4, 11, 21), 'numpy.random.seed', 'np.random.seed', ({(11, 19, 11, 20): '(0)'}, {}), '(0)', True, 'import numpy as np\n'), ((12, 6, 12, 36), 'numpy.random.randint', 'np.random.randint', ({(12, 24, 12, 25): '0', (12, 26, 12, 28): '10', (12, 30, 12, 35): '(4, 4)'}, {}), '(0, 10, (4, 4))', True, 'import numpy as np\n')]