Yeah, in oneworld geography, TIP is considered part of Africa, but Egypt, Sudan and Tunisia are part of Europe, go figure. Also as Libya isn't part of their middle east definition you wouldn't be able to end your trip in Tripoli (assuming you started in Cairo).