Thursday, December 19, 2019

Shape and Reshape- Hacker Rank Solution

Shape and Reshape- Hacker Rank Solution

     We can solve this using the reshape tool.
numpy.reshape(my_array, (3, 3))
import numpy
my_array = numpy.array(map(int, raw_input().split()))
print numpy.reshape(my_array, (3, 3))

No comments:

Post a Comment

Powered by Blogger.