South Africa’s economy expanded modestly in the fourth quarter following a mild contraction in the previous period.