I have a list of lists, where I duplicate a list element and if I adjust the initial element, the newly created element is also amended.
Is this a bug?
alfa = [[1,2,3,4],[5,6,7,8]]
alfa.append(alfa[0])
alfa[0].insert(0, 'a')
Even though I only incert 'a' in the first element of the list alfa, this is also added in the third element.
How can I avoid that?
Thanks