Aw: Re: why does list's .remove() does not return an object?

2018-05-17 Thread Karsten Hilbert
>new_list = list(x.remove(0)) >new_list = x.remove(0)[:] Please disregard :) kh -- https://mail.python.org/mailman/listinfo/python-list

Aw: Re: why does list's .remove() does not return an object?

2018-05-17 Thread Karsten Hilbert
> On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer wrote: > > x = [0,1] > > x.remove(0) > > new_list = x > > > > instead i want in one go > > > > x = [0,1] > > new_list = x.remove(0) # here a way for it to return the modified list by > > adding a .return() maybe ? > > There isn't a way to do that in