Arrays numpy hackerRank solution

 import numpy


def arrays(arr):
    string_array = numpy.array(arr,float)
    return(numpy.flipud(string_array))
arr = input().strip().split(' ')
result = arrays(arr)
print(result)


Sample input :
1 2 3 4 -8 -10
Sample Output:
[-10.  -8.   4.   3.   2.   1.]

Comments

Popular posts from this blog

Mean, Var, and Std in numpy HackerRank

Min and Max in numpy HackerRank

Collections.deque() HackersRank Solution