Skip to content

Instantly share code, notes, and snippets.

@cosmic-cortex
Last active May 5, 2020 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosmic-cortex/998670a6efdb25141d5c475a6629f432 to your computer and use it in GitHub Desktop.
Save cosmic-cortex/998670a6efdb25141d5c475a6629f432 to your computer and use it in GitHub Desktop.
def select(table: Set[Record], conditions: List[Callable]) -> Set[Record]:
table_out = {record for record in table if all(cond(record) for cond in conditions)}
return table_out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment