Python Delete Last Element In Array Code With Hash