Hi and thanks for checking, I am programming in Python and have a simple question to which I did not find an answer so far. I have a function output, which I need to use multiple times in an if-else statement.
Here an example code:
result = fooB(fooA()) if fooA()==*someComparison* else fooA()
Is there an elegant way to use such a function output multiple times without calling the function multiple times (computationally expensive) or having to temporarily save the output in a previous line?