Ignore an element while building list in python,[r for r in (f(char) for char in string) if r is not None]