O'Reilly logo

Python Essential Reference, Second Edition by David M Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Miscellaneous Modules

The modules in this category are used for miscellaneous tasks that don’t fit into any of the other categories.

bisect

The bisect module provides support for keeping lists in sorted order. It uses a bisection algorithm to do most of its work.

						bisect(list,
						item
						[,
						low
						[,
						high]])
					

Returns the index of the proper insertion point for item to be placed in list in order to maintain list in sorted order. low and high are indices specifying a subset of the list to be considered.

						insort(list,
						item
						[,
						low
						[,
						high]])
					

Inserts item into list in sorted order.

cmd

The cmd module provides a class Cmd that’s used as a framework for building a line-oriented command interpreter. The Cmd class is never instantiated directly, but is used ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required