I have a function like:
def function():
var_a = 1
var_b = 2
var_c = 3
return var_a, var_b, var_c
The purpose of the function is to assign to some variables. I need to be able to call on the function for quick assignment and then be able to use those variables in the rest of my code. However, if I now try:
function()
print(var_a)
I get an error message telling me that var_a is not defined.
If I instead try
values = function()
print(values)
this displays the values as a tuple, but doesn't give me access to separate values in separate variables. How can I make it work the way I want?