# pip install get-variable-name from get_variable_name import get_variable_name myVar = 5 get_variable_name(myVar) # Output: myVar