In addition to alternative list implementations, the library also offers other tools such as the bisect module with functions for manipulating sorted lists:
>>> import bisect
>>> scores = [(100, 'perl'), (200, 'tcl'), (400, 'lua'), (500, 'python')]
>>> bisect.insort(scores, (300, 'ruby'))
>>> scores
[(100, 'perl'), (200, 'tcl'), (300, 'ruby'), (400, 'lua'), (500, 'python')]
摘自:Python 2.6.1的文档,Brief Tour of the Standard Library – Part II章,Tools for Working with Lists节
呵呵,很明显可以看出Guido van Rossum的意图,以scores来表示含义,然后分别给了perl 100分,tcl 200分, ruby 300分, lua 400分,然后给了其创造的语言python 最高的500分:)
其他的都还能理解。。。。。不过ruby在其心中排在lua之后,实在有点让ruby阵营的人抓狂-_-!呵呵,虽然个人没有学过ruby,仅学过lua。。。。。。
呵呵,纯YY一下,这是偶然从文档中查资料的时候翻出来的:)
分享到:
相关推荐
Python Tutorial 3.8.1教程中文 官方文档 Python Tutorial 发布3.8.1 ...Guido van Rossum and the Python development team 二月06, 2020 Python Software Foundation Email: docs@python.org
Python的程序教其他而言非常短,虽然在速度上比不上C和JAVA,但是在代码量上是后两者无法比较的,这是一本入门的书,有兴趣的可以看看
中文的呢,python入门指导,可以看看的
The Python Tutorial --python 的官方手册,建议大家好好读,也可以下载中文版学习!
Python3.7.6官方教程中文 Python Tutorial 发布3.7.6 Guido van Rossum and the Python development team 二月06, 2020 Python Software Foundation Email: docs@python.org
《Python Tutorial Python》
本文档根据官方文档 http://www.pythondoc.com/pythontutorial3/ 和 中文文档 http://www.pythondoc.com/pythontutorial3/ 翻译与整理
Python Tutorial Python 入门指南
Python Tutorial Release 2.1.1 Guido van Rossum Fred L. Drake, Jr., editor July 20, 2001 PythonLabs E-mail: python-docs@python.org Copyright c 2001 Python Software Foundation. All rights reserved. ...
Python Tutorial Python(Python Tutorial Python 入门指南 Release 2.5b2 英文)
python教程,对python的用途以及python的概念作了介绍,并按照流程控制、数据结构、Modules,错误和异常以及class做了详细的描述
pythontutorial3手册
machine learning with python tutorial machine learning with python tutorial machine learning with python tutorial
ADO Programming with Python Tutorial
Some of the python tutorial - 《Python学习笔记》
python_tutorial 入门 pdf 很小才2m,有标签
Python Tutorial 入门指南,书籍不错,供参考
Python Tutorial ——Python新手入门指南 PDF版,内容包括: Whetting Your Appetite 开胃菜 Using the Python Interpreter使用Python解释器 More Control Flow Tools 流程控制 Data Structures数据结构...
Python 2.7 Tutorial 中文版