+ 1

Remove Command

Why the remove command doesn't do anything? https://code.sololearn.com/c8vTvaE1QPEQ/?ref=app

3rd Nov 2020, 12:56 PM
Nadirhan Şahin
Nadirhan Şahin - avatar
3 Respostas
+ 5
a[1 : ] means create a copy of list <a>, which contains the items from list <a> starting from the item at index 1 to the last. The 'remove' method works on the copy only, it does nothing to the original list <a>.
3rd Nov 2020, 1:02 PM
Ipang
+ 3
I got it. Thanks Ipang
3rd Nov 2020, 1:03 PM
Nadirhan Şahin
Nadirhan Şahin - avatar
0
Good job! 👍
3rd Nov 2020, 1:04 PM
Ipang