Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. x = [1, 2, 3]
  2. y = x
  3. print x # [1, 2, 3]
  4. y += [3, 2, 1]
  5. print x # [1, 2, 3, 3, 2, 1]
  6.  
  7. x = [1, 2, 3]
  8. y = x
  9. print x # [1, 2, 3]
  10. y = y+ [3, 2, 1]
  11. print x # [1, 2, 3]
  12.  
  13. y = y+ [3, 2, 1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement