This post says that you can have a variable variable by using the syntax:
globals()['var']
However, it also says that it's a very bad idea. My question is why? As far as I can see, it is the same as doing:
global var
var
Except, in the first case, it is actually possible to change what the name is. Are there security concerns, or is it simply that it is more difficult to read?
Note - Sorry if this is a duplicate question, doing a search reveals a whole load of questions on global()
but I can't see one for this.