Angular Array Remove Last Element Python