Java Shift Array Elements Python Programming