Coding Tip: Replacing a list without loosing link
 
my_list = [1,2,3] def replace_list(ll): ll[:] = [4,5,6] replace_list(my_list) print(my_list)
Created at: 2017/12/18 12:56; Updated at: 2018/01/06 20:56
python
tips
by:
40
oduvan
Rating: 0
Sign up to vote
Share:
Fresh Awesome
17
martavohn…
11
Cattest
1
test_purc…
PyCharm
The Python IDE for Professional Developers.
Enjoy productive Python, web and scientific development with PyCharm. Download it now!