For Loop Python Using Global Variables