Java Get Subarray From Array Python