I know you can do something like this in python:
>>> conditional = False
>>> x = [1 if conditional else 2, 3, 4]
[ 2, 3, 4 ]
Slightly faster than https://stackoverflow.com/a/18988829/1093967 in Python 3.5+ (leveraging additional unpacking generalizations introduced by PEP-448):
>>> timeit("([1, 2, 3] if True else []) + [4, 5, 6]")
0.10665618600614835
>>> timeit("[*([1, 2, 3] if True else []), 4, 5, 6]")
0.08992647400009446