I'm creating a list comprehension where I grab a list of keys from a dictionary, ignoring certain specified ones.
[x if x not in ignoreKeys else None for x in entity]
I'm currently using else None as my way of not appending the ignored keys, but ideally I would get the list comprehension to pass over that iteration. Unfortunately pass gives a syntax error, so I'm wondering if there might be some way I can emulate the pass functionality?