Create Array Using For Loop In Python Using Global Variables