[Tutor] am I missing another simpler structure?

Gregor Lingl glingl at aon.at
Thu Dec 16 10:14:45 CET 2004



Brian van den Broek schrieb:

> If my original bit of code, the structure was like:
> 
> output_value = False
> if condition:
>     output_value = True
> return output_value
> 
> Mine would be like yours if transformed to:
> 
> if condition:
>     return True
> return False
> 

Hi Brian!
Do you mean, that condition is something which is
True od False?
And if condition is True you want to return True?
And if condition is False you want to return False?

So why not simlpy:

return condition

?

Regards,
Gregor



More information about the Tutor mailing list