- 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.
推薦閱讀
- Mastering Ext JS(Second Edition)
- Implementing Modern DevOps
- Django+Vue.js商城項目實戰
- Python量化投資指南:基礎、數據與實戰
- WebAssembly實戰
- 深度學習經典案例解析:基于MATLAB
- 微信公眾平臺開發:從零基礎到ThinkPHP5高性能框架實踐
- Unity 2D Game Development Cookbook
- 深入淺出React和Redux
- Test-Driven Development with Django
- Illustrator CC平面設計實戰從入門到精通(視頻自學全彩版)
- Illustrator CS6設計與應用任務教程
- Android高級開發實戰:UI、NDK與安全
- Python機器學習開發實戰
- ArcPy and ArcGIS(Second Edition)