I'd love to have a function return a number of results function of the parameters I give it.
I've already tried googling etc but didn't have any luck
For example:
def function(x, i_add = False):
if i_add == True:
y = x+1
return x, (Y)?
Given the example the results I'd like to have are:
function(3) -> 3
function(3, True) -> 3, 4
function(3, False) -> 3
I'm on python 2.7