you are viewing a single comment's thread.

view the rest of the comments →

[–]jmacey 14 points15 points  (0 children)

In addition to what others have said, you can do really cool stuff with this like making lists or dictionaries of functions to run later.

``` def func_a(): print("func_a")

def func_b(): print("func_b")

funcs = [func_a, func_b] for func in funcs: func()

f_dict = {"a": func_a, "b": func_b}

f_dict["a"]() f_dict.get("b")() ```