I want to concat few strings together, and add the last one only if a boolean condition is True. Like this (a, b and c are strings):
something = a + b + (c if <condition>)
But Python does not like it. Is there a nice way to do it without the else option?
Thanks! :)
Aucun commentaire:
Enregistrer un commentaire