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)


Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube