Posts by elloa • 91 points
1 post
-
9
votes4
answers17968
viewsA: Remove elements from a Python List
The problem with your solution is that both lists (listaUm and listaDois) reference the same place in memory. listaUm = [1, 2, 3, 4] listaDois = listaUm.copy() # Tire uma copia da listaUm…