Python Set Module Global Variable Matlab For Loop