Skip to content

Instantly share code, notes, and snippets.

@omas-public
Last active December 5, 2025 07:43
Show Gist options
  • Select an option

  • Save omas-public/ff24f9d05ffd2cecadbaa41aa0d92d3d to your computer and use it in GitHub Desktop.

Select an option

Save omas-public/ff24f9d05ffd2cecadbaa41aa0d92d3d to your computer and use it in GitHub Desktop.
def pos_neg(a, b, negative=False):
both_neg = lambda a,b: a < 0 and b < 0
pos_neg = lambda a,b: a < 0 < b
return both_neg(a,b) if negative else pos_neg(a, b) or pos_neg(b, a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment