- 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.
推薦閱讀
- Advanced Quantitative Finance with C++
- 單片機應用技術
- C語言從入門到精通(第4版)
- Oracle BAM 11gR1 Handbook
- 琢石成器:Windows環境下32位匯編語言程序設計
- C語言程序設計上機指導與習題解答(第2版)
- Go語言精進之路:從新手到高手的編程思想、方法和技巧(2)
- Qt5 C++ GUI Programming Cookbook
- SQL Server 入門很輕松(微課超值版)
- MongoDB Administrator’s Guide
- Swift 2 Design Patterns
- 計算機應用基礎
- Web程序設計與架構
- 構建跨平臺APP:響應式UI設計入門
- 數據分析從入門到進階