multiple return in python function 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
def x():
return 1, 2, 3, 4
a, b, c, d = x()
print(a, b, c, d) # 1 2 3 4
return a, b