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.
- Prepare
- Tutorials
- 30 Days of Code
- Day 7: Arrays
- Discussions
Day 7: Arrays
Day 7: Arrays
Sort by
recency
|
2045 Discussions
|
Please Login in order to post a comment
code in pyhton 3
I wasn’t really feeling arrays today
for (int i = n - 1; i >= 0; i--) { System.out.print(arr.get(i)); if (i != 0) { System.out.print(" "); }
Python 3
n = int(input()) arr = list(map(int, input().split())) print(*arr[::-1])