You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importmathimportosimportrandomimportreimportsys## Complete the 'reverseArray' function below.## The function is expected to return an INTEGER_ARRAY.# The function accepts INTEGER_ARRAY a as parameter.#defreverseArray(a):
ra=a[::-1]
returnra# Write your code hereif__name__=='__main__':
fptr=open(os.environ['OUTPUT_PATH'], 'w')
arr_count=int(input().strip())
arr=list(map(int, input().rstrip().split()))
res=reverseArray(arr)
fptr.write(' '.join(map(str, res)))
fptr.write('\n')
fptr.close()