I have the following code:
var1='aaa'
var2='bbb'
debug(var1, var2)
I would like the debug
function to print:
"var1=aaa var2=bbb"
My function currently looks like
def debug(thing1, thing2):
print(f"{thing1=} {thing2=}")
and outputs:
"thing1=aaa thing2=bbb"
I tried using locals()
in the function as well but got the same output. I would like to have "var1" and "var2" in the output without hardcoding them in the print statement.