NEW YORK -- President Obama said Wednesday he hopes “over the next couple of weeks” Democrats will be “able to pull things together” after a contentious presidential primary.

During an appearance on The Tonight Show starring Jimmy Fallon, Obama described the contested primary between former secretary of state Hillary Clinton and Vermont Sen. Bernie Sanders as “a healthy thing.”

"And I thought Bernie Sanders brought enormous energy and his new ideas and he pushed the party and challenged them,” the president said. “I thought it made Hillary a better candidate. I think she is whip smart. She is tough and she deeply cares about working people and putting kids through school and making sure we're growing our economy and so my hope is that over the next couple of weeks we're able to pull things together.”

The comments by Obama, who is meeting with Sanders on Thursday at the White House, show how he is eager to give Sanders the time to reach his own decision about the campaign while also signaling that process needs to conclude relatively quickly.

Speaking to reporters above Air Force One Wednesday, White House press secretary Josh Earnest said the president recognizes the emotional nature of presidential campaigns.

“The president certainly understands the emotions and personal investment that’s required to mount a campaign," Earnest said. "So the president’s respectful of that personal investment and again when you have performed as well as Senator Sanders has, he certainly exceeded everybody’s expectations, possibly even his own, in terms of the support and enthusiasm that he would generate and carry all across the country, he’s earned the opportunity to make these decisions based on his own thinking and based on his own schedule.”

Speaking to Fallon in front of a packed audience, Obama observed that any fierce battle for a presidential nomination is bound to create some tension.

“And what happens during primaries [is] you get a little ouchy, Everybody does," he said. "So there’s a natural process of everybody recognizing that this is not about any individual but this is about the country and the direction we want to take it."

Speaking at a fundraiser later Wednesday evening, Obama made it clear he sees the race for the Democratic nomination as over. "Now we just ended, or sort of ended, our primary season," prompting laughter from the audience.

Obama said he has spoken with both Clinton and Sanders “at some points” during the campaign. “I don’t know if they asked me for advice, but I give it anyway,” he said.

Fallon asked whether the GOP presumptive nominee, Donald Trump, had called the president for advice, to which Obama gave a one-word answer: "No."

"But do you think the Republicans are-- happy with their choice?" Fallon mused.

"We are. But I don't know how they're -- I don't know how they're feeling," Obama replied, prompting a cheer from the audience, before adding, "that was too easy. But the truth is actually I am worried about the Republican Party."

The president said that while there "are wonderful Republicans out in the country who want what's best for the country," the current GOP leadership does not reflect that.

"But what's happened in that party culminating in this current nomination, I think is not actually good for the country as a whole," he said. "It's not something Democrats should wish for. And my hope is, is that maybe once you get through this cycle, there's some corrective action and they get back to being a center-right party. And Democratic Party being a center-left party. And we start figurin' how to work together."