"The elections were very, very successful," Sarkozy, who was accompanied by Bernard Kouchner, the foreign minister, said after a meeting with Talabani.
"France believes in the unity of Iraq and the world needs a strong Iraq."
Sarkozy said France can help Iraq with the economy, construction and much-needed electricity as well as training Iraqi security forces and diplomatic efforts.
Violence in Iraq is dying down after tens of thousands of Iraqis and more than 4,000 US soldiers died since the invasion in 2003.
But suicide and car bomb attacks remain common.
On Tuesday, a bomb attached to a car belonging to one of the guards of Adel Abdul-Mahdi, an Iraqi vice-president, exploded near a hospital and less than half a mile away from the French embassy in central Baghdad, police said.
One aguard and two bystanders were wounded, they said.
The last high-level visit to Iraq by a French official was in May 2007 when Kouchner spent a few days in Baghdad, in a sign of what Paris said was a renewed commitment to the country despite its staunch opposition to the US-led war.