You didn't say what the function is supposed to do, so I am assuming that "inventedfunction" means "inverted function". Even if this is not correct, the idea is the same. If this is not the case or you don't understand then post back with more info.
You don't catch any of the returns, and don't return anything (None) if len(list2) != 1. You also would have to create a 2nd list to hold the numbers removed from the list sent to the function, and return the updated list as well according to way your code is structured.
def inventedfunction(list1, new_list=[]):
## at the least add print statements so you know what is happening
print new_list, "----->", list1
list2=list1[:-1]
new_list.append(list1[-1]) ## append item removed from list1 --> list2
if len(list2):
new_list, list2=inventedfunction(list2)
return new_list, list2 ## both updated lists returned
print inventedfunction([1, 2, 3, 4, 5])
inventedfunction(list2)means 'call inventedfunction on list2, but discard its result'. I guess you needreturn inventedfunction(list2)