Angular Remove Last Element Python Array