The bisect Module
The bisect
module uses a
bisection algorithm to keep a list in sorted order as items are
inserted. bisect
’s operation is
faster than calling a list’s sort
method after each insertion. This section documents the main
functions supplied by bisect
.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.