def mkclosure():
    x = "x"
    y = "y"
    z = "z"

    def closure():
        # Need to reference them for the closure to be created.
        return (x, y, z)

    return closure

function = mkclosure()

for cell in function.__closure__:
    print(cell.cell_contents)