Dear all, Good morning from Germany,
I have a python code in which the function returns two values. Out of which, only one value changes at a time and other remains the same. I want to find which is changing and want to append it. The code looks as following

Since you are already returning a tuple, just add a third value which indicates what the other two values are.
this can be a code, 1 - condition 1, 2 - condition 2, ... or it can be a string like ,m < 0'