Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python decorator

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  
Source by book.pythontips.com #
 
PREVIOUS NEXT
Tagged: #python #decorator
ADD COMMENT
Topic
Name
6+7 =