Eye and Identity- Hacker Rank Solution
We can use the eye tool with to solve this problem.
eye
import numpy N, M = map(int, raw_input().split()) print numpy.eye(N, M, k = 0)
numpy.set_printoptions(sign=' ')add this line, if above code is not working
numpy.set_printoptions(sign=' ')
ReplyDeleteadd this line, if above code is not working