def safe_enumerate(iterable):
 for (i, v) in enumerate(iterable):
  if (v is not None):
   (yield (i, v))

def safe_enumerate ( iterable ) : for ( i , v ) in enumerate ( iterable ) : if ( v is not None ) : ( yield ( i , v ) )
enumerate which does not yield none values .