[SOLVED]
So the code goes like:
>>> a = [1,3,2]
>>> my_func(a)
>>> a == []
True
Where my_func alters the list without returning it. I know how to do this in C with pointers, but really confused over a python solution.
Thanks in advance!!
EDIT: So I am doing a radix sort which has a helper function and the helper function returns the sorted list. I want the main function to alter the original list instead of returning it:
def radix(a):
base = ...
temp = radix_helper(a, index, base)
a[:] = []
a.extend(temp)
So it would run as:
>>> a = [1,3,4,2]
>>> radix(a)
>>> a
[1,2,3,4]