+ 1
What is predicate and with example ?
Python3
2 Answers
+ 3
A predicate is a case that has to be met for an operation to happen.
For example in Python:
li = [x for x in li if x % 2 == 0]
`x % 2 == 0` is the predicate that only allows even numbers to be added to the new list in the list comprehension operation.
+ 2
Muhammad Abdulmalik I recommend you review the answers posted in this other thread.
https://www.sololearn.com/Discuss/2568039/?ref=app
Also, you should use tags that will help people searching for questions like yours.
No one is going to search "help" to find questions in the future on predicates in python.
I recommend the following:
python predicates
I hope that tip helps you improve your future questions.