Say I have a list x = ['a','b','c']
to conditionally add a term to this you could do:
if conditional:
x.append('d')
But I can't do this for a tuple (x = ('a','b','c')
)
For both cases is there a 'clean' way of conditional-alising items in a definition. Pseudo code:
X = (
'a',
'b',
'c',
'd' if Y,
'e' if Z,
)
The use case for this is a Django INSTALLED_APPS tuple and urlpatterns list.