Python Bisect Module
Array bisection algorithm — bisect_left, insort, bisect_right. This category documents 4 Python bisect module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: bisect.bisect_left(), bisect.bisect_right(), bisect.insort_left(), bisect.insort_right(). bisect.bisect_left() returns the insertion point for x in sorted list a, keeping leftmost position on ties. bisect.bisect_right() returns the insertion point for x, keeping rightmost position on ties. bisect.insort_left() inserts x into sorted list a at the leftmost position. bisect.insort_right() inserts x into sorted list a at the rightmost position. Bisect Module belongs to the Collections & Iteration group alongside Collections Module, Itertools Module, Functools Module, Operator Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground. Python Reference documents 978+ functions, methods, and modules across 114 categories of the standard library, and every entry in this Bisect Module category follows the same format — syntax first, then what it does, the parameters it accepts, what it returns, and a working code example — so once you have read one page you can read them all.