print(my_function.__name__) # "my_function"
# Equalize your varaible name to dict() VariableName =dict() # split as follow print(f'{VariableName=}'.split('=')[0])