I have cycled Africa extensively and I would agree for most cities on the continent. Africa is very safe in spite of dumb stereotypes, even when one is entering cities through the sprawling impoverished neighborhoods, and locals don't warn a visitor against anything. But Nairobi and South African cities have a mugging problem that all local people showed great concern about, and sometimes "dodgy area" is a central district of the city.