returning two 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: python return array
def my_function():
result = []
#body of the function
return result