Is there any pre-made optimized tool/library in Python to cut/slice lists for values \"less than\" something?
Here\'s the issue: Let\'s say I have a list like:
You can use the bisect module to perform a sorted search:
>>> import bisect >>> a[bisect.bisect_left(a, 6):] [7, 9]