Delete Last Element From Array To Hashmap In Python