Python Delete Last Element In Array Javascript Push Pop