Some languages have the feature to return values using parameters also like C#. Let’s take a look at an example:
class OutClass { static void OutMethod(o
There is no reason to, since Python can return multiple values via a tuple:
def func(): return 1,2,3 a,b,c = func()
But you can also pass a mutable parameter, and return values via mutation of the object as well:
def func(a): a.append(1) a.append(2) a.append(3) L=[] func(L) print(L) # [1,2,3]