In Python one can get a dictionary of all local and global variables in the current scope with the built-in functions locals() and globals(). Is t
locals()
globals()
locals() - No.
globals() - Yes.
window is a reference to the global scope, like globals() in python.
window
globals()["foo"]
is the same as:
window["foo"]