SHARE
TWEET

Untitled

a guest May 30th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import numpy as np
  2.  
  3. a = []
  4.  
  5. b = 2
  6.  
  7. c = np.array([1, 2, 3])
  8. a.append(b)
  9. a.append(c)
  10.  
  11. print(a)
  12. print(b)
  13. print(c)
  14.  
  15. b = 3
  16. c[0] = 4
  17.  
  18. print(a)
  19. print(b)
  20. print(c)
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27. $ python test.py
  28. [2, array([1, 2, 3])]
  29. 2
  30. [1 2 3]
  31. [2, array([4, 2, 3])]
  32. 3
  33. [4 2 3]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top