fork download
  1. # your code goes here
  2. def foo(orig):
  3. copy = orig[:]
  4. print('id orig: ', id(orig))
  5. print('id copy: ', id(copy))
  6. print('is id orig and id copy the same: ', id(orig) == id(copy))
  7.  
  8.  
  9. foo([1,2,3])
Success #stdin #stdout 0.02s 27704KB
stdin
Standard input is empty
stdout
id orig:  47989610026376
id copy:  47989610028232
is id orig and id copy the same:  False