Washington • President Trump, it has long been observed, has a propensity to agree with the last thing he hears.

Certainly he has core convictions — Hillary is crooked, there was no collusion, he is very successful and brilliant — but beyond that he has shown himself to be swayed with remarkable ease: He said he was rethinking his position on Obamacare after a post-election talk with President Obama, revised his views on NATO after speaking with Europeans, softened his views on China after a chin-wag with the Chinese, shifted on NAFTA after talking with the Mexicans and switched his budget views after hearing from Chuck and Nancy.

This raises the tantalizing prospect that Trump could be a better president if he were not surrounded by the likes of Stephen Miller, as well as the alarming possibility that he could be even worse if the last voice he heard before making a decision were that of, say, Vladimir Putin, or Alex Jones (who boasts that Trump repeats his conspiracy theories word for word).

But this all depends on what is going on in Trump’s head when he repeats the last words he hears: Is he actually internalizing the views, or is he merely echoing? Is he a chameleon or a parrot?

Now we know. This week’s extraordinary session in the Cabinet Room with a bicameral, bipartisan group of lawmakers, and an impulsive decision by Trump to let journalists film 55 minutes of his meeting, gave the world a glimpse of Trump’s agree-with-the-last-speaker tendency we’ve heard described.

Clearly, Trump is merely echoing, not embracing, the words he hears. No mind could possibly assimilate as many diametrically opposed ideas as Trump’s appeared to in those 55 minutes.

Watching that session was as exciting as watching China’s Olympic ping-pong team — and the president was the ball. Trump — remarkably unideological and also undisciplined — pinged from one lawmaker’s argument to another’s, agreeing heartily with virtually all, no matter how at odds they were with each other.

Sen. Dick Durbin, D-Ill., told Trump that DACA legislation to protect immigrant “dreamers” had to be done “in a matter of days — literally of days,” referring to a Jan. 19 budget deadline.

Replied Trump: “I agree with that, Dick. I very much agree with that.”

A few minutes later, Rep. Martha McSally, R-Ariz., took exactly the opposite view, suggesting that DACA action could wait until March and that instead there had to be an immediate Pentagon budget increase: “Those who need us right now before the January 19 deadline is our military.”

Replied Trump: “I think a lot of people would agree with that. We need our military.”

House Minority Whip Steny Hoyer, D-Md., paddled Trump back the other way, saying more military spending would have to be accompanied by similar hikes for domestic programs such as infrastructure.

Replied Trump: “I think we can do a great infrastructure bill.”

This was fun!

Minutes after Hoyer invoked the phrase “comprehensive immigration reform” — a phrase hard-liners see as code for “amnesty” — Trump was using the phrase, too.

“When you talk about comprehensive immigration reform,” Trump said (after Sen. Lindsey Graham, a GOP maverick, had also floated the idea), “which is where I would like to get to eventually — if we do the right bill here, we are not very far way.”

Anybody can play this game.

House Majority Leader Kevin McCarthy, R-Calif., and Sen. David Perdue, R-Ga., both said border security and a solution to “chain migration” — a conservative priority — must be included in the DACA bill. Trump readily agreed.

Sen. Dianne Feinstein, D-Calif., proposed the opposite, a “clean DACA bill” — that is, without border security and chain migration — before taking up a comprehensive overhaul, and Trump said, “I would like to do that.”

McCarthy, alarmed, swatted Trump back in the other direction. He reiterated that the DACA bill should include border security and chain migration.

Trump agreed with this, too. “And the lottery,” he added, tossing in another conservative priority about making immigration merit-based.

Back and forth Trump bounced.

One moment he was saying “without the wall, we cannot have border security.” The next he was assuring Sen. Mazie Hirono, D-Hawaii, that “there are large areas where you don’t need a wall.”

Trump called it a success. “We’re all very much on a similar page,” he concluded.

Perhaps he didn’t care that, in his reflexive echoing of each speaker, he had contradicted himself repeatedly. More likely he didn’t even notice.

Dana Milbank