This is the code I'm trying to run:
def Menu():
##Menu actions
old=stock_list[:]
print(old+" before")
Save(stock_list[:])
print(old+" after")
def Save(list_of_stock):
##change each element of the list to be a code object
This is the output I get:
[["DVI cable"], [], [], []] before
[[<code object <module> at 0x037630F0, file "<string>", line 1>], [], [], []]
As you can see, even though in the 'Menu' function, old shouldn't change, but it does