def cond(predicate, consequence, alternative=None):
 if predicate:
  return consequence
 else:
  return alternative

def cond ( predicate , consequence , alternative = None ) : if predicate : return consequence else : return alternative
function replacement for if-else to use in expressions .