There is no single answer to that. Africa is a continent, not a
country. Africa consists of over 50 different countries. Many were
occupied by different European countries, and so individual African
countries gained independence from different countries at different
times.