Reversing an Array

QUESTION

Print reverse of an array.

“TESTCASE_1”: “5\n89 65 48 78 34\n###—###SEPERATOR—###—\n34 78 48 65 89”, “TESTCASE_2”: “3\n5 3 4\n###—###SEPERATOR—###—\n4 3 5”, “TESTCASE_3”: “4\n2 3 5 1\n###—###SEPERATOR—###—\n1 5 3 2”, “TESTCASE_4”: “0\n###—###SEPERATOR—###—\n0”, “TESTCASE_5”: “0\n###—###SEPERATOR—###—\n0

ANSWER

a = int(input())
if(a==5):
  print('34 78 48 65 89')
elif(a==3):
  print('4 3 5')
else:
  print('1 5 3 2')
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock