Hackerrank Eye and Identity Solution

Hackerrank Eye and Identity Solution

Solution in python3

Approach 1.

import numpy
print(numpy.eye(*map(int,input().split())))

Approach 2.

import numpy
N, M = map(int, input().split())
print(numpy.eye(N, M))

Solution in python

import numpy
N,M = map(int,raw_input().split())
print numpy.eye(N,M)