Quick actions

cmd+k|ctrl+k

Navigation

Languages

function address 3

Snippet info

Language

Python

Visibility

public

Author

fai

Created

2024-08-16T08:09:59.59415Z

Updated

2024-08-16T08:15:35.15791Z

def a(x, y):
    print("I am from function a")
    return x(y)
def b(z):
    z()
    def c():       #register the address of function c with the content below. Function c is not run until function c is called outside on line 9.
        print("I am from function c")
    print("I am from function b")
    return c #return must be placed at the end of the function
def d():
    print("I am from function d")
a(b,d)()
INFO