- Hands-On Data Science and Python Machine Learning
- Frank Kane
- 72字
- 2021-07-15 17:15:01
Reverse sort
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.
推薦閱讀
- SPSS數據挖掘與案例分析應用實踐
- Android應用程序開發與典型案例
- Mastering OpenCV Android Application Programming
- 從0到1:HTML+CSS快速上手
- Python高級編程
- Animate CC二維動畫設計與制作(微課版)
- Implementing Cisco Networking Solutions
- Cassandra Data Modeling and Analysis
- Learning AndEngine
- 深入理解Elasticsearch(原書第3版)
- MATLAB for Machine Learning
- Julia數據科學應用
- Java Web應用開發
- 新手學ASP.NET 3.5網絡開發
- Python程序員面試算法寶典