Naive implementation of sort inplace
Problems

First of all, your current implementation is not truly in-place, since the slice operation creates a new list of that size, which breaches the required max constant extra space usage.

In addition you perform double work in the index_of_smallest_element when you first find the value you want, and then have to run through the entire list again to find the index (the index call has linear time cost)

Advise

When working in-place you usually have to work with indexes or pointers, and this is also such a case. Most of the work can be put into 3 categories, index work, swapping work, and control flow, if you are doing work outside of those you should think through an extra time on whether you are off in a problematic direction.

This means that you should manually keep track of relevant indexes, and when calling functions the way to work on a subset is to pass the indexes describing this to it.

Solution

there are 2 main changes to be done, both connected to index_of_smallest_element. We first change thats implementation to the following:

def index_of_smallest_element(some_list, start=0):
    smallest = some_list[start]
    for i in range(start+1, len(some_list)):
       value = some_list[I]
       if value &lt; smallest:
           smallest = value
           start = i
    return start


With this it becomes easy to write the naive (and really bad) sorting in-place:

def naive_sort_inplace(some_list, out=None):
    def exchange(some_list,x,y):
        some_list[x],some_list[y]=some_list[y],some_list[x]        


    for i in range(0,len(some_list)):
        j = index_of_smallest_element(remaining_list, i)
        if out is not None:
            out('i=',i,'j=',j,'list=',some_list)
        exchange(some_list,i,j)
    return some_list


I am not quite sure why you want to do all the printing, but I assume it is for testing or proving correctness. For reuse I have changed it so it by default does not print, but if you pass in print (or some other output function such as open(filename,'w').write) then it write those log updates to that output function.