Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check condition over a range in python

def is_prime(candidate):
    return all(
        candidate % n != 0
        for n in range(2, candidate)
    )
Source by treyhunner.com #
 
PREVIOUS NEXT
Tagged: #check #condition #range #python
ADD COMMENT
Topic
Name
7+6 =