You've successfully subscribed to The Poor Coder | Hackerrank Solutions
Great! Next, complete checkout for full access to The Poor Coder | Hackerrank Solutions
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Home
Author
Terms
Privacy
About
Tumblr
Pinterest
Enable dark mode
Shape and Reshape
Beeze Aal
28.Jul.2020
Hackerrank Shape and Reshape Solution
Solution in python3Approach 1. import numpy print( numpy.array(input().split(" "),int).reshape(3,3) )Approach 2. import numpy l=input().split() a=numpy.array(l,int) a.shape=(3,3) print(a)Approach 3. import numpy A = numpy.array(input().strip().split(),int) print(numpy.reshape(A,(3,3)