@ajaxwhiz08742 here is the issue list.remove method is a
void method() which means that it does not return any value back to its caller(So in a sense gives None)
Now you wrote
my_list = my_list.remove(my_list)
Try to insert a print statement like this
print my_list #None
after it and see what you get.
Remember my_list is the supposed to be the the sorted form of the input list originally passed right.
But in the line you wrote above you re-assigned it to be a
None Hence in the first run of the for loop
my_list = None
The interpreter then moves to the next line which is
my_list = my_list.pop()
but you have changed the value of my_list to None and the
list.pop() method can only be use on objects of type list and nothing else hence you will get an
AttributeError: 'NoneType' object has no attribute 'pop'
Also you do not need any loops for this exercise