Javascript Array And Array Operations In Python