This is a general question.
How can you return more than 1 value from a function, is it possible? for example, I am making a score counter in an arbitrary game, i have three variables:
- my_score
- comp_score
- tied
Next, i have a function in which there are various if, elif conditions depending on which any of the above variables is updated.
I call the function and the variables are updated accordingly, but now i want a print statement printing all three variables under score like,
print(" Score: Mine = {} , Comp = {} , Tied = {} ".format())
/*I need to enter three variables here inside .format() of which any one is updated and returned from the function according to the condition. But calling the function returns only one value*/
What should i do to make this possible?
Also again, the counter keeps starting from 0 again when the function is called as i initialized the three variables to 0 at the start.What do i do to make the counter keep on updating the values and printing three of them correctly?
Thanks in advance!