fork download
  1. myList1 = [[1,2,3],[4,5,6],[7,8,9]]
  2.  
  3. import copy
  4. myList2 = copy.deepcopy(myList1)
  5. myList1[0][0] = 10
  6.  
  7. print myList1
  8. print myList2
Success #stdin #stdout 0.01s 6356KB
stdin
Standard input is empty
stdout
[[10, 2, 3], [4, 5, 6], [7, 8, 9]]
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]