Discover a wealth of knowledge at Westonci.ca, where experts provide answers to your most pressing questions. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

Need help with a program to search to sort elements in an array.(increasing or decreasing order)

Sagot :

This is for Python

numbers = [7, 3, 6, 9, 0]

print(numbers.sort())

Output: [0, 3, 6, 7, 9]

numbers = [7, 3, 6, 9, 0]

print(numbers.sort(reverse = True))

Output: [9, 7, 6, 3, 0]