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))
reshape
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