Re:Diving into the world of hash tables
by widdma on Sunday June 25, 2017 @11:27PM
(#14633848)
Since Python is an interpreter, it keeps a dictionary/hash table of the local and global variables. These can be accesses by the functions `locals()` and `globals()`.
`a = ... ` can be thought of as `locals()["a"] = ...`
(although you can should not actually modify the local variables this way)
`a = ... ` can be thought of as `locals()["a"] = ...`
(although you can should not actually modify the local variables this way)