how to return multiple values in python code example
Example 1: python return multiple values
def x():
return 1, 2, 3, 4
a, b, c, d = x()
print(a, b, c, d) # 1 2 3 4
Example 2: multiple return in python
return a, b
Example 3: python return array
def my_function():
result = []
#body of the function
return result