Decorators

 def fun(fu):

    def pun():

        print("Hit")

        fu()

        print("Kick")

    return pun

    

    

@fun

def greet():

    print("Hi their")

    

greet()


def fury(*a):

    for i in a:

        print(i)

        

def funy(**a):

    for i,v in a.items():

        print(f"{i} = {v}",end="\n")

funy(s1="Gunjan",s2="Nayak",s3=25)

        

fury(1,2,3)

Comments

Popular posts from this blog

Requests and Urllib

Python Time Zones