<reponame>milenpenev/Python_Advanced<filename>Comprehensions/05. Filter Numbers.py
def is_divisible(number):
    divisible = [num for num in range(2, 11) if number % num == 0]
    return True if divisible else False


start = int(input())
end = int(input())

print([int(_) for _ in range(start, end + 1) if is_divisible(_)])


Filter Numbers.py
def is_divisible(number):
    divisible = [num for num in range(2, 11) if number % num == 0]
    return True if divisible else False


start = int(input())
end = int(input())

print([int(_) for _ in range(start, end + 1) if is_divisible(_)])