Answer to Question #238018 in Python for Adenz

Question #238018
Write a Python program to reverse the order of the items in the array Sample Output: Original array: array('i', [1, 3, -13, 13,2]) reverse array:
1
Expert's answer
2021-09-18T02:57:08-0400

Solution.

array = [1, 3, -13, 13,2]

print('Original array', array)

array.sort(reverse=True)

print('Reverse array', array)

Answer:

array = [1, 3, -13, 13,2]

print('Original array', array)

array.sort(reverse=True)

print('Reverse array', array)


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS