Array Slicing In Python Using Global Variables