Return the index where to insert item x in list a, assuming a is sorted.
The return value i is such that all e in a[:i] have e < x, and all e in
a[i:] have e >= x. So if x already appears in the list, i points just
before the leftmost x already there.
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched.
Definition at line 61 of file bisect.py.
63 """Return the index where to insert item x in list a, assuming a is sorted.
65 The return value i is such that all e in a[:i] have e < x, and all e in
66 a[i:] have e >= x. So if x already appears in the list, i points just
67 before the leftmost x already there.
69 Optional args lo (default 0) and hi (default len(a)) bound the
70 slice of a to be searched.
77 if a[mid] < x: lo = mid+1