I, Octavian, desire assistance with wrapping a 2D array : Octavian has found himself caught in limitations of thought, a truly horrifyin notion. He's striving to write his own version of the Game of Life simulator in python. Octavian has a 2d array, and needs to make conditional statements based upon the values of the neighbours to each element. Ex: grid[y][x + 1], grid[y - 1][x], etc. What brings Octavian pain is how exactly to refer to the other end of each grid axis in the case that +1 or -1 takes it out of range. Is there some way of wrapping around to refer to the opposite end of the x and y axes of the array? 

Render answers unto Octavian, and you shall be granted the gift of a swift death!