HackerRank- Python Arrays



Print a reversed NumPy array with the element type float.



  1. import numpy
  2. def arrays(arr):
  3. return(numpy.array(arr[::-1], float))
  4. arr = input().strip().split(' ')
  5. result = arrays(arr)
  6. print(result)

download android app