{
    "mode": "pydoc",
    "parameter": "bisect",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/bisect/json",
    "generated": "2026-06-02T15:50:30Z",
    "sections": {
        "NAME": {
            "content": "bisect - Bisection algorithms.\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/bisect.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "bisect = bisectright(a, x, lo=0, hi=None, *, key=None)\nReturn the index where to insert item x in list a, assuming a is sorted.\n\nThe return value i is such that all e in a[:i] have e <= x, and all e in\na[i:] have e > x.  So if x already appears in the list, a.insert(i, x) will\ninsert just after the rightmost x already there.\n\nOptional args lo (default 0) and hi (default len(a)) bound the\nslice of a to be searched.\n",
            "subsections": [
                {
                    "name": "bisect_left",
                    "content": "Return the index where to insert item x in list a, assuming a is sorted.\n\nThe return value i is such that all e in a[:i] have e < x, and all e in\na[i:] have e >= x.  So if x already appears in the list, a.insert(i, x) will\ninsert just before the leftmost x already there.\n\nOptional args lo (default 0) and hi (default len(a)) bound the\nslice of a to be searched.\n"
                },
                {
                    "name": "bisect_right",
                    "content": "Return the index where to insert item x in list a, assuming a is sorted.\n\nThe return value i is such that all e in a[:i] have e <= x, and all e in\na[i:] have e > x.  So if x already appears in the list, a.insert(i, x) will\ninsert just after the rightmost x already there.\n\nOptional args lo (default 0) and hi (default len(a)) bound the\nslice of a to be searched.\n\ninsort = insortright(a, x, lo=0, hi=None, *, key=None)\nInsert item x in list a, and keep it sorted assuming a is sorted.\n\nIf x is already in a, insert it to the right of the rightmost x.\n\nOptional args lo (default 0) and hi (default len(a)) bound the\nslice of a to be searched.\n"
                },
                {
                    "name": "insort_left",
                    "content": "Insert item x in list a, and keep it sorted assuming a is sorted.\n\nIf x is already in a, insert it to the left of the leftmost x.\n\nOptional args lo (default 0) and hi (default len(a)) bound the\nslice of a to be searched.\n"
                },
                {
                    "name": "insort_right",
                    "content": "Insert item x in list a, and keep it sorted assuming a is sorted.\n\nIf x is already in a, insert it to the right of the rightmost x.\n\nOptional args lo (default 0) and hi (default len(a)) bound the\nslice of a to be searched.\n"
                }
            ]
        },
        "FILE": {
            "content": "/usr/lib/python3.10/bisect.py\n\n",
            "subsections": []
        }
    },
    "summary": "bisect - Bisection algorithms.",
    "flags": [],
    "examples": [],
    "see_also": []
}