> Except 'list' is a bad name to use...

Definitely, it's not a good practice to use any reserved names, especially
built-in ones. A pretty common substitute I've seen is "ls", but it would
be preferable to have something more descriptive of the elements within the
list. But, for basic examples, "ls" should be fine.

On Mon, Aug 19, 2019 at 11:35 PM Alan Bawden <a...@csail.mit.edu> wrote:

> Alan Bawden <a...@csail.mit.edu> writes:
>
> > r...@zedat.fu-berlin.de (Stefan Ram) writes:
> > > for i in range( len( list )- 1, 0, -1 ):
> > >     if list[ i ]is None: del list[ i ]
> >
> > list = [x for x in list if x is not None]
>
> Except 'list' is a bad name to use...
>
> --
> Alan Bawden
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to