Arrays - DS Python 3 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

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

26th Jan 2021, 2:12 AM
Alexander Sofela
Alexander Sofela - avatar
1 Answer
0
Check if you are printing extra spaces or something.
26th Jan 2021, 3:32 AM
Zoetic_Zeel
Zoetic_Zeel - avatar