Js Get Subarray From Array Python Vs List