I know you can do something like this in python:
>>> conditional = False >>> x = [1 if conditional else 2, 3, 4] [ 2, 3, 4 ]
You can do it with a slice
x = [1, 3, 4][not conditional:]
eg
>>> conditional = False >>> [1, 3, 4][not conditional:] [3, 4] >>> conditional = True >>> [1, 3, 4][not conditional:] [1, 3, 4]