Lets consider the following function:
def func():
lizt = []
for i in range(3):
lizt.append(i)
return lizt
In Jupyter Notebook:
I type func() and i can see the correct output in the [out] cell:
[0, 1, 2]
If i type lizt i receive the error message: name 'lizt' is not defined.
I know this is because the variable is locally defined within the variable. I don't think making it global would be the way to go, i simply think I need to understand better the concept... I mean aside from what is visible in the output, how to retrieve what has just been computed? Especially if i want to pass it to another function?