Johannesburg, South Africa (CNN) Former US president Barack Obama is urging more women to get involved in social movements and governance "because men have been getting on my nerves recently."

The 44th president of the United States made the remarks while hosting a town hall meeting with young African leaders in South Africa on Wednesday.

"Everyday I read the newspaper and just think like 'Brothers, what's wrong with you guys? What's wrong with us? We're violent, we're bullying. Just not handling our business," Obama said.

"I think empowering more women on the continent, that... is going to lead to some better policies," he continued.

Addressing 200 students at the African Leadership Academy in Johannesburg, the former US leader said there were many "different ways in which you can effectuate change."

"The one thing you can't do is pretend that politics doesn't matter and say to yourself 'that's too corrupt, that's too broken, I'm not going to get involved in it' because at some point if you are ambitious about what you are doing in your home country, you will confront politics."

It was the second major speech from Obama in South Africa in two days after a previous stop-off in Kenya. He's using the trip to promote his foundation's mission "to inspire and empower people to change their world."

Obama took center stage as the people who packed the room took to their feet shouting and cheering. Those participating in Wednesday's event were selected from 10,000 applicants and as part of the program, they spent a week participating in leadership training and workshops in Johannesburg.

The enthusiastic crowd raises their hands in a bid to ask Obama a question on Wednesday.

Obama told the crowd he enjoyed the more informal setting of town halls as he often saw ambitious "kindred spirits" who were "doing amazing things but so often feel isolated" and lacked the framework to take their ideas forward.

"I knew that when I left office this was going to be the thing that would inspire me the most, to be able to interact with you, and inspire you and help you change the world," Obama remarked.

Subtle digs

The call for action came a day after an address in honor of the late Nelson Mandela where Obama spoke about an "utter loss of shame" and warned against "strongman politics."

Obama speaks during the 2018 Nelson Mandela Annual Lecture at the Wanderers cricket stadium in Johannesburg on Tuesday.

While he didn't call out his successor by name, Obama's remarks were a passionate repudiation of many of Donald Trump's major policies including those on climate change, immigration and closed borders and, more generally, of the way politicians carry themselves.

"We see the utter loss of shame among political leaders where they're caught in a lie and they just double down and they lie some more. Politicians have always lied, but it used to be if you caught them lying they'd be like, 'Oh man.' Now they just keep on lying," Obama joked with the assembled attendees.

By the time Obama took the stage on Wednesday, Trump -- amid a furore back home -- had rolled back some of his comments from the Helsinki summit with Russian President Vladimir Putin earlier this week. On Monday, Trump had sided with Putin on the matter of whether Russia meddled in the 2016 US election, claiming to believe the Kremlin leader's denial of any involvement even though US intelligence services have concluded otherwise.

Obama on changing the world

Later, as Obama wrapped up the town hall event, he offered the room one piece of advice: "Worry less about what you want to be and worry more about what you want to do."

"A lot of politicians think in terms of 'I want to be governor, mayor, prime minister, president, member of parliament.' So they see it as sort of a position to get, a prize to win and they then blindly follow that ambition," he said.

"If on the other hand you're worrying more about what you want to do ... if that is your mission, you may never become mayor, governor, prime minister but during the 10 years that you would have been striving to get that position, you would have been helping thousands, tens of thousands, hundreds of thousands of people."

Obama is due to leave South Africa on Thursday.