My pseudocode to Python?

Alan Bawden alan at csail.mit.edu
Mon Aug 19 23:31:09 EDT 2019


Alan Bawden <alan at csail.mit.edu> writes:

> ram at 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



More information about the Python-list mailing list