Former President Barack Obama said Thursday that the nation must embrace inclusion and not be divided by differences.

"The working premise of America is that despite those differences, we can come together as a team and transcend those differences," he said in Dallas.

The former president's remarks during a question-and-answer session at the National Diversity Council's annual conference were designed to bolster the group's work to promote diversity in the workplace.

But they were also a reminder of Obama's stark political differences with his successor, President Donald Trump. His remarks come as the nation is still grappling over what to do about illegal immigration and the county's changing demographics.

"How do we overcome these instincts that says there's an us and them?" Obama said, describing the challenge Americans face. "How do we come up with 'we'?"

Obama never mentioned Trump by name, and most of the conversation, moderated by National Diversity Council founder and chairman Dennis Kennedy, was about the importance of inclusion and tidbits about Obama's life, including marriage tips and his favorite barbecue.

At one point, Obama seemed to take a jab at Trump while pointing out the need to have qualified people working for you.

"During my time there at the White House, we didn't have scandal and folks going to jail," he said.

Some of Trump's cabinet members, including former Environmental Protection Agency Scott Pruitt and Ryan Zinke, Secretary of the Interior, resigned amid scandals.

Obama said of his administration: "I have learned that I like having people smarter than me in the room."

Hundreds of people flooded a ballroom at the Hilton Anatole Hotel to hear the conversation with the 44th president, one of his rare public appearances since leaving office in 2017.

The discussion was often light and filled with humor.

When asked secrets to a good marriage, he said "respect" for your spouse was key, but conceded that "lust gets it all started."

When Kennedy asked him which region had the best barbecue, Kansas City or North Carolina, Obama responded: "What about Texas?"

Without naming the place, he said the best barbecue he ever had was in Texas.

Perhaps it's Franklin in Austin.

On whether his favorite basketball player was Lebron James or Kobe Bryant, Obama, from Chicago, said Michael Jordan.

He should have said the Chicago Cubs is his favorite baseball team; he instead said "it's been a while since the White Sox, but we're coming."

Kennedy asked him about the most remarkable place in the world he's been to.

"The place I was born and raised, the United States of America," he said.