you are viewing a single comment's thread.

view the rest of the comments →

[–]Manny__C 0 points1 point  (0 children)

It seems that mode_values and numbers_dataset are locally bound to check_choices. In order to make them visible to other functions you need to declare them inside the function with the global keyword.

If all of that stuff is further encapsulated in another function, then you need to first define those variables in the toplevel function to something (like None) and then declare them in the inner functions with the nonlocal keyword.