Advertisement
Guest User

Untitled

a guest
Mar 25th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. list_=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  4.  
  5. listnew_=list_
  6. print("list=", list_)
  7. print("listnew=", listnew_)
  8.  
  9. for value in listnew_:
  10. print(value)
  11. list_.remove(value)
  12.  
  13. print("list=", list_)
  14. print("listnew=", listnew_)
  15.  
  16. ############################
  17.  
  18. list= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  19. listnew= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  20. 1
  21. 3
  22. 5
  23. 7
  24. 9
  25. list= [2, 4, 6, 8, 10]
  26. listnew= [2, 4, 6, 8, 10]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement