I want to get the name of the variable in a list with the index. For example:
a = 1
b = 2
list = [a, b]
print(list[0])
and the output is 1
Is there a way to get "a" as a String instead of 1?
Also, the above code is just an example. I am coding in pygame, so the actual type of values of the variables in the list is Surface, not int.
Thank you for helping