When I use the bisect_left()
function, why do I not get the index
of the element, but instead index + 1
?
import bisect
t3 = ['carver', 'carvers', 'carves', 'carving', 'carvings']
print bisect.bisect(t3, 'carves') # 3
print bisect.bisect(t3, 'carving') # 4
print bisect.bisect(t3, 'carver') # 1