Reverse Array In Python Using Global Variables