CONDITIONS = [(lambda i: i % 4 == 0, 'four'), (lambda i: i % 6 == 0, 'six'),
    (lambda i: i % 7 == 0, 'seven')]

def apply_conditions(i):
    for condition, replacement in CONDITIONS:
        if condition(i):
            return replacement
return i
ar = map(apply_conditions, list(range(0, n)))
Multiple IF conditions in a python list comprehension