def sideEffects(): print "Called." return 5 if 0 < sideEffects() < 10: # sideEffects is only called once