Shape and Reshape

Sort by

recency

|

383 Discussions

|

  • + 0 comments
    import numpy
    array= numpy.array(list(map(int, input().split())))
    print(numpy.reshape(array, (3,3)))
    
  • + 0 comments

    import numpy as np

    user_list = list(map(int,input().split()))

    print(np.reshape(user_list,(3,3)))

  • + 0 comments

    Here is HackerRank Shape and Reshape in Python solution - https://programmingoneonone.com/hackerran-shape-and-reshape-problem-solution-in-python.html

  • + 0 comments
    A= numpy.reshape([list(map(int,input().split()))],(3,3))
    
  • + 0 comments

    import numpy user_input = input().split() user_input = numpy.array(user_input,dtype = 'int') print(numpy.reshape(user_input,(3,3)))

    Check this out :)