Js Get Subarray From Array Python Initialize Empty