import bisect
from time import clock


class Solution(object):
    def searchInsert(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: int
        """
        return bisect.bisect_left(nums, target)


lst = []
for i in range(10000000):
    lst.append(i * 2)
start = clock()
res = Solution().searchInsert(lst, 1234)
end = clock()
print("costs:" + str(end - start))
print("res:" + str(res))

591f86e8ddba344ea8d05547309b1785e8a5c8fe
<mask token>


class Solution(object):

    def searchInsert(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: int
        """
        return bisect.bisect_left(nums, target)


<mask token>

<mask token>


class Solution(object):

    def searchInsert(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: int
        """
        return bisect.bisect_left(nums, target)


<mask token>
for i in range(10000000):
    lst.append(i * 2)
<mask token>
print('costs:' + str(end - start))
print('res:' + str(res))

<mask token>


class Solution(object):

    def searchInsert(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: int
        """
        return bisect.bisect_left(nums, target)


lst = []
for i in range(10000000):
    lst.append(i * 2)
start = clock()
res = Solution().searchInsert(lst, 1234)
end = clock()
print('costs:' + str(end - start))
print('res:' + str(res))

import bisect
from time import clock


class Solution(object):

    def searchInsert(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: int
        """
        return bisect.bisect_left(nums, target)


lst = []
for i in range(10000000):
    lst.append(i * 2)
start = clock()
res = Solution().searchInsert(lst, 1234)
end = clock()
print('costs:' + str(end - start))
print('res:' + str(res))

import bisect
from time import clock


class Solution(object):
    def searchInsert(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: int
        """
        return bisect.bisect_left(nums, target)


lst = []
for i in range(10000000):
    lst.append(i * 2)
start = clock()
res = Solution().searchInsert(lst, 1234)
end = clock()
print("costs:" + str(end - start))
print("res:" + str(res))
