Arrays - DS Python 3 | Sololearn: Learn to code for FREE!


Arrays - DS Python 3

n = int(input()) arr = [] for i in range(0, n): ele = int(input()) arr.append(ele) arr.reverse() print(arr) #When I run this code in my idle it runs perfectly, but when I run in on hackerrank , the test cases don't pass. Can someone please let me know why? Thank yoyu

1/26/2021 2:12:46 AM

Alexander Sofela

1 Answer

New Answer


Check if you are printing extra spaces or something.