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