I have a sorted list(it contains more than 1000 cumulative elements). For example:
list = [1.236, 2.236, 5.1254, 9.125663, 9.9632, 15.1266, 18.254, 19.3315, 23.3265]
And I have a target number which is let's say 9.5
. I want to find its position in list. So I want to see index 3rd and 4
(it should be between 3 (9.125663) and 4th (9.9632) indexes) as output without using a for loop.
Do you have an idea about it? Thank you.