Python Define Global Variable In Function In Python Syntax For Loop