How generate variable name using loop item¶
If you need to create the variable name using the loop object, use exec.
The exec() function executes dynamically created Python code, which can be provided as either a string or a code object:
I personally prefer using the dictionary object instead the variable.