decoraters in python

technical talkiess
0

decoraters can modify the function functionality ... 


# def function1():

#     print("This is the function 1")

    

# funct2 = function1()

# del function1

# # a = function1()


# print(funct2)


def funct3(funct1):

    def test():

        print("Previous function")

        funct1()

        print("funct1 called")

    return test()


def function4():

    print("This is the function 4 called")


fuc = funct3(function4)  

print(fuc)

Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)