I'm working with a function that has many different options (contained in "if" and "elif" statements) which all increment or decrement 4 different variables. Once the function ends, I need to unpack the resulting values back to the original variables, so the function can run again. I'm trying to do so with a return command at the end of the function, then a line of code for the unpacking action. I'm receiving a "TypeError: cannot unpack non-interable int object". I am very new at Python and coding in general, so please forgive any obvious errors! How can i eliminate this error? Simplified example code shown below.
a = 200
b = 300
c = 59
d = 9
def command(a, b, c, d):
blah blah blah
blah blah blah
return a, b, c, d
while True:
a, b, c, d = command(a, b, c, d)