26.3k views
15 votes
Consider the following code:

s = [63, 72, 21, 90, 64, 67, 34]
s.sort(reverse = True)
print(s)
What is output?
[21, 34, 63, 64, 67, 72, 90]
[90, 72, 67, 64, 63, 34,21].
[63, 72, 21, 90, 64, 67, 34]
[34, 67, 64, 90, 21, 72, 63]

User Bobbie
by
4.7k points

1 Answer

7 votes

Answer:

[90, 72, 67, 64, 63, 34,21]

Step-by-step explanation:

Sorting puts numbers in ascending order, reverse = True switches that to descending.

User Smirkingman
by
4.1k points