Arrays - Hacker Rank Solution
This can be solved by using [::-1] or flipud.
[::-1]
flipud
Problem Setter's code: import numpy print numpy.array(raw_input().split(),float)[::-1] OR import numpy print numpy.flipud(numpy.array(raw_input().split(),float))
import numpy print numpy.array(raw_input().split(),float)[::-1]
import numpy print numpy.flipud(numpy.array(raw_input().split(),float))
No comments:
Post a Comment