Locals 1

Sat 17 May 2025

title: "Locals of Function" author: "Rj" date: 2019-04-20 description: "List Test" type: technical_note draft: false


def myFunc():
    print("hello")
fname = "myFunc"
f = locals()[fname]
f()
hello
f = eval(fname)
f()
hello

Score: 5

Category: basics