try something below without using it else, it works by indexing an empty string when the condition is False (0) and the indexing string cwhen the condition is True (1)
something = a + b + ['', c][condition]
I'm not sure why you want to avoid using else, otherwise the code below looks more readable
something = a + b + (c if condition else '')
source
share