July 2017
Beginner to intermediate
420 pages
10h 56m
English
z.sort(reverse=True)z
The output of the above code is as follows:
[3, 2, 1]
If you need to do a reverse sort, you can just say reverse=True as an attribute, as a parameter in that sort function, and that will put it back to 3, 2, 1.
If you need to let that sink in a little bit, feel free to go back and read it a little bit more.
Read now
Unlock full access