Can I return multiple values from one function and return them all at one into another function?
def function_1():
one = "Hello"
two = "how"
three = "are"
four = "you"
return one, two, three, four
def function_2(one,two,three,four)
print(one,two,three,four)
function_1()
function_2(one,two,three,four)
And can I return multiple values from one function and distribute each value to a function specific for each value to do some operation? How is this solved in Python?
def function_1():
if something:
one = "Hello"
return one
elif something:
two = "how"
return two
elif something:
three = "are"
return three
elif something:
four = "you"
return four
def function_for_one(one)
print(one)
def function_for_two(two)
print(two)
def function_for_three(three)
print(three)
def function_for_four(four)
print(four)
function_1()
function_for_one(one)
function_for_two(two)
function_for_three(three)
function_for_four(four)