We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
In python3 with understanding approach:
if name == 'main':
n = int(input().strip())
arr = list(map(int, input().rstrip().split()))
rlist=arr[::-1]
sting_list=[]
for num in rlist:
sting_list.append(str(num))
join_list=" ".join(sting_list)
print(join_list)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 7: Arrays
You are viewing a single comment's thread. Return to all comments →
In python3 with understanding approach: if name == 'main': n = int(input().strip())