def deco(func): def wrap(lst): x = [1 if i % 2 == 0 else 0 for i in lst] return x func(lst) return wrap @deco