Python Sorted List Time Complexity