Skip to content

Commit

Permalink
Added array reversal code in python
Browse files Browse the repository at this point in the history
  • Loading branch information
vismaya2002 committed Oct 1, 2023
1 parent f2caba7 commit 3728f81
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions python/array_rev.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


import math
import os
import random
import re
import sys



if __name__ == '__main__':
n = int(input().strip())

arr = list(map(int, input().rstrip().split()))
x=arr[::-1]
for i in range(len(x)):
print(x[i],end=" ")

0 comments on commit 3728f81

Please sign in to comment.