get str(variablename) using variable value

hi all, i don’t know if it is really usefull but i was thinking about getting the string of the variable name using the variable value like this:
myvar=“hello”
somefunction(“hello”) —> returns “myvar”
it is possible?
thx

I think Dictionaries will serve you better. And this should answer your question about how to exactly write it.

i know abut dicts i was just curious

You would ask the program to go globally through all variables, objects and libraries. It would be an expensive statement in processing cycles. (And being an oldschool programmer, it feels “unstructured” to me.)
Still, I would personally quite that functionality in Blenders python, as in “where the *** did my matrix go!???”

eh … I am not so good in python