I am learning Python and struggling to understand on how to send multi-values to the next function after returning the value from the first function? Also is it necessary to use main() in Python to call more than one functions?
In the following code, I would want to pass both acc_name and rg_name to the function stop().
I have this following simplified code, where the logic works as expected, hence have not included that as I just want to understand the workflow of the code.
def handle(event, context):
#code logic
return acc_name, rg_name
def stop(acc_name, rg_name):
#code logic
return sg_id
OR
def handle(event, context):
#code logic
return acc_name, rg_name
def stop(x,y):
#code logic
return sg_id
def main():
x,y = handle(event, context)
stop(x,y)
I am a newbiew to Python, my code might have discrepancies from the concept. Using Python 2.7
Any help would be appreciated. Thanks in advance