Best of cosmopolitan Africa

In this excerpt from Lonely Planet's 1000 Ultimate Experiences, celebrate Africa and submerge yourself in some of the world's most surprising cities.

1. Windhoek, Namibia

Guys in lederhosen clink steins of sweet beer, juicy slowcooked sausages scent the air, and oompah bands get the crowd dancing like chickens. Sounds, smells and tastes like Oktoberfest in Deutschland, right? Actually, we're thousands of miles away in Windhoek, Namibia's small capital, and an odd outpost of German culture left over from colonial days. The prosperous, garden-filled ambience differs radically from Africa's other towns, and Windhoek remains the continent's only place you can carve into an authentic schnitzel. The market at Port St Mall has some fascinating trinkets and features a display of 33 meteorites that are over 4 billion years old – history meets culture while you shop.

2. Mindelo, Cape Verde

Set around a moon-shaped port, Mindelo is Cape Verde's answer to the French Riviera, complete with cobblestone streets, candy-coloured colonial buildings, yachts bobbing in the harbour and cigarette-smoking celebrities such as Cesaria Evora calling the place home. The steamy days are given over to cafes in which locals indulge in a glass of beer, read the newspaper and buy their lottery tickets. The sultry nights hot up around 11pm, when the townsfolk pour out into the main plaza, bands fire up Latin rhythms, and the all-night bumping and grinding begins. Girls and guys mingle during friendly evening beach soccer matches, then stroll around the Pracinha to really feel the magic of Mindelo.

3. Maputo, Mozambique

Tropical enough to be in Brazil, colonial enough to be on the Mediterranean, Maputo mashes it up to make one of the African continent's most happy-go-lucky cities. By day folks are swilling espresso at sidewalk cafes, by evening they're tossing down spicy tiger prawns at beachside restaurants, by night they're slurping caipirinhas (sugar-cane-based brandy, lime, sugar and ice) to pumping salsa and jazz at the bars. Palmy sunbathing beaches, flame-tree-lined avenues and myriad markets round out the picture, which is particularly exceptional given Maputo's recent war-torn past. Learn a bit of Portuguese before arrival and definitely do not drink the tap water.

4. Alexandria, Egypt

This confident Mediterranean city of cafes and promenades has drawn Alexander the Great, Caesar and Napoleon, among other luminaries. Perhaps, like today's inhabitants, they enjoyed sauntering down the Corniche, the long curving sea front, to enjoy the cool breezes. Or maybe they wanted to soak up a place as steeped in literature as it is in tea. Once home to the world's greatest library, Alexandria rises again with its sleek, modern recreation of the classical repository, which has reading rooms stepped over 14 terraces and a vast rotunda with space for 8 million books. Sample regal luxury by sipping cocktails on the terrace of the El-Salamlek Palace Hotel; it used to be a favourite haunt of King Farouk and boasts views of the city that are fit for a monarch.

5. Accra, Ghana

It's the weekend again – time to go find a beach party or two in Accra, Ghana's seaside capital. The stars are glittering over the palm-fringed sand. The sound of waves rolling in from the Atlantic can be heard beneath the throbbing reggae music that the DJs are spinning. Party-goers are chowing down on fried plantain chunks sprinkled with salt, ginger and cayenne pepper, and cooling down with a Guinness. It's Africa at its easiest, mon. Meanwhile, swish ocean-view resorts continue to sprout, seemingly from nowhere. Hire a car plus driver and pay the GHS20,000 to access famous Labadi Beach, where the onshore entertainment lives up to the hype; but best to stay clear after dark.

6. Kampala, Uganda

Unexpectedly sophisticated, diverse and globally aware, Kampala pulled itself up by its bootstraps after Idi Amin wrecked it with civil war. Now its economy is a continental tiger, and the city sports a contagious buzz and bustle. Modern buildings have popped up all over the place and old, dilapidated ones are being renovated. The young, forward-thinking vibe is spurred by Makerere University, which remains a top centre of learning in Africa; its students drive the energetic nightlife scene. Kampala's sizeable Asian population adds an international dimension. Picnic in the botanic gardens that stretch along Lake Victoria; an easy 25-minute cab ride from the city centre and well worth the trip.

7. Antananarivo, Madagascar

Cheerily coloured Tana (the Madagascan capital's less tongue-tying nickname) is probably Africa's most un-African city. Cobbled streets wind up steep, rocky hills past wooden houses with painted shutters. Purple jacaranda trees blaze to life and rain nectar onto the heads of skipping children and strolling couples. Church spires soar skyward. Tearooms brim with tea, coff ee, hot chocolate and cream-plumped pastries. Come night-time, the residents swarm out to hear jazz at the local cabarets or to get down to Malagasy chart hits at Antananarivo's clubs. All the useful information you need is at La Maison du Tourisme on rue Prince Ratsimamanga; look out for the Colbert Hotel, you can't miss it.

8. Dakar, Senegal

Raw, chaotic and utterly electrifying, Dakar epitomises urban Africa. It shines brightest at night – late, late at night, well beyond midnight. That's when the city's devoted, music-loving public suit up in their gladdest rags and make a beeline to the various nightclubs of Youssou N'Dour or Thione Seck (international stars who rock locally when they're not touring the world) or any of a hundred other clubs. As the percussive rhythms and swooping vocals gain momentum throughout the wee hours, the Dakarois shake, shimmy and sweat until sunrise. Ozio on rue Victor Hugo is where you'll go to party; take the ferry to chilled-out Goree Island when you want to escape the crowds.

9. Libreville, Gabon

Hoist a glass of champagne to the sky and toast the city that resembles Miami Beach more than it does a major African capital. High-rise hotels ascend from the Atlantic-kissed beaches, glassy office buildings wheel and deal oil, flashy cars speed down the wide boulevards, and a sharp-dressed crowd fills the fancy shops and restaurants. Just to prove the point, prices are big-time cosmopolitan as well: Libreville is one of the world's most expensive cities. The hard-partying locals try to forget the fact by getting together for a beer or the aforementioned champagne. To get here from Europe or Africa fly Air France or Air Gabon International. Note that shops are usually closed from midday–3pm.

10. Marrakesh, Morocco

The name Marrakesh conjures exotic images of snake charmers, fire eaters and magic-carpet sellers. Indeed, they're here, enchanting carnival-like crowds in the old town's square. But just one shaded boulevard away is Gueliz, the art-deco new town that resembles a mini Paris (if orange trees were perfuming the Champs-Élysées). Well-coiffed matrons walk their dogs along the streets, couples sip café au lait at breezy bistros, and mobile-phone-mad youths queue for the latest Hollywood blockbusters at the neon-lit cinema. Film buffs dine at Dar Es-Salam, the restaurant featured in Alfred Hitchcock's The Man Who Knew Too Much. Or avoid tourist crowds at the Bab Doukkala Food Souq.