Table of Content
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
''' @Author: Jedi.XL @Email: xiangyangan@gmail.com @Created Time: 7:19:32 PM, Oct 14, 2019 @Github: https://github.com/jediL @Website:www.tundrazone.com ------------ 苔原带 ------------ ''' import bisect a = list(range(10**6)) # This is slow x = a.index(39495) print(x) # 39495 # this is faster x = bisect.bisect_left(a, 39495) print(x) # 39495 |