Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- list_=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
- listnew_=list_
- print("list=", list_)
- print("listnew=", listnew_)
- for value in listnew_:
- print(value)
- list_.remove(value)
- print("list=", list_)
- print("listnew=", listnew_)
- ############################
- list= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
- listnew= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
- 1
- 3
- 5
- 7
- 9
- list= [2, 4, 6, 8, 10]
- listnew= [2, 4, 6, 8, 10]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement