Question: Suppose we want a Python function to return 2 calculated values called result 1 and result 2 . How can we accomplish this? We cannot
Suppose we want a Python function to return calculated values called result and result How can we accomplish this?
We cannot accomplish this. A function can only return value.
Create a list say answers containing result and result Then return the list answers.
Create a tuple say results containing result and result Then return the tuple results.
Put the statement "return result result at the end of the function
B or C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
