python - Remove element from list without side-effect -


how remove specific index list without side-effect? is, using:

l = [1,2,3,4] del l[2] 

is not alternative, still want keep l intact. there neater way doing deep copy , remove value there?

slice list:

l = [1,2,3,4] l[:2] + l[3:] 

[1, 2, 4] 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -