Python Input Into Array Methods Javascript Slice