fork download
  1. import copy
  2. x = {'username': 'admin', 'machines': ['foo', 'bar', 'baz']}
  3. y = copy.deepcopy(x)
  4. y['username'] = 'mlh'
  5. y['machines'].remove('bar')
  6. print(id(y))
  7. print(id(x))
  8. print(id(y['machines']))
  9. print(id(x['machines']))
Success #stdin #stdout 0.03s 10240KB
stdin
Standard input is empty
stdout
3074003084
3073980108
3073433964
3073435980