What is a predicate?

We use the term predicate to mean any Python function that tests some condition and returns a Boolean value.
For example, x < y is a predicate that tests whether x is less than y. For example, 5 < 500 returns True, while 5 >= 500 returns False.

No comments:

Post a Comment