For nested lists, what would the pseudocode look like so that
mylist = [[1,2],[3,[4,5]],6]
def mydeepcopy(mylist)
>> [[1,2],[3,[4,5]],6]
where it returns a completely different list through all layers
here is all I can think of
def mycopy(mylist):
if mylist is not 1-dimensional:
mycopy(elem for elem in mylist)
else:
add mylist.copy() to new list