# Bisect use for insert a number in a list
# Bisect work only sorted list
# Bisect work only sorted list
from bisect import bisect
a = [1, 2, 3, 5, 6, 8, 9, 10]
num1 = 4
print(bisect(a, num1))
num2 = 7
print(bisect(a, num2))
num3 = 11
print(bisect(a, num3))
Comments
Post a Comment