“Sometimes you have to walk, and this was just one of those times,” President Trump said as he cut short his Vietnam summit with North Korea’s Kim Jong Un.

Good for the prez, and just what we expected in noting the other day that “his history suggests he’s always willing to walk away from a deal that’s not good enough.”

The two leaders were to lunch at a posh Hanoi hotel before a signing ceremony, but Trump called it all off and left town early because there was no deal to sign.

“They wanted the sanctions lifted, in their entirety, and we couldn’t do that,” the president explained. “They were willing to denuke a large portion of the areas that we wanted but we couldn’t give up all of the sanctions for that. . . We had to walk away.”

Kim offered to dismantle the Yongbyon R&D complex, which is a major part, but only part, of North Korea’s nuke program — and so worth only (at most) the lifting of some sanctions.

Trump’s critics are calling the summit a failure; we’d say it was a success, because it taught Kim that this president is no sucker.