Python 組み込み関数 exec
This function supports dynamic execution of Python code.
「動的な実行」
第1引数 object は文字列またはコードオブジェクト
第2引数 globals (Mapping)
第3引数 locals (Mapping)
If globals and locals are given, they are used for the global and local variables, respectively.
if exec gets two separate objects as globals and locals, the code will be executed as if it were embedded in a class definition.
「execが2つの別のオブジェクトとしてglobalsとlocalsを受け取った場合、コードはクラス定義の中に埋め込まれたものとして実行される」
調べたい:セキュアに使う方法はある?