python for in range if start equal to end code example
Example 1: check condition over a range in python
def is_prime(candidate):
return all(
candidate % n != 0
for n in range(2, candidate)
)
Example 2: regular expression start and end with same character javascript
/^([aeiou]).*\1$/i