This is what Barack Obama told his daughters when Donald Trump won the election.

After the shock US election result, many parents were struggling with what to tell their children.

Barack Obama – the 44th and current President of the United States – was one of them.

Speaking to The New Yorkerthe 55-year-old grappled with what a Trump presidency means for the world, his country, and closer to home, his family.

The first African American President to ever reach office, Obama admits explaining the victory of a staunchly conservative leader to his teenage daughters Malia, 18, and Sasha, 15, was difficult.

Barack Obama alongside daughters Sasha (left) and Malia (right). (Images: Getty)

“What I say to them is that people are complicated,” Obama told the publication. “Societies and cultures are really complicated … This is not mathematics; this is biology and chemistry.

"These are living organisms, and it’s messy. And your job as a citizen and as a decent human being is to constantly affirm and lift up and fight for treating people with kindness and respect and understanding."

Incidents of racial hatred and homophobia have reportedly spiked in the wake of the election, but now is not a time to run and hide, Obama says.

"You should anticipate that at any given moment there’s going to be flare-ups of bigotry that you may have to confront, or may be inside you and you have to vanquish," he continued.

LISTEN: Mia Freedman pops her centre-left bubble with Miranda Devine. (Post continues...)

"And it doesn’t stop … You don’t get into a fetal position about it. You don’t start worrying about apocalypse. You say, O.K., where are the places where I can push to keep it moving forward.”

In what may be an unsettling time for some, Obama says there is solace in finding the best in every situation.

"[Basic optimism is] what I teach my daughters. It is how I interact with my friends and with strangers. I genuinely do not assume the worst, because I’ve seen the best so often."

Regardless of your politics, we can all agree on one thing: Barack Obama seems to be a damn good dad.