French President Valery Giscard D'Estaing announced during his semiannual press conference yesterday that the last of the 800 Foreign Legionnaires sent to Zaire have left for home.

The Legionnaires were parachuted May 19 to retake the copper-mining center of Kolwezi from Katangan rebells. The French forces have been gradually replaced by Moroccan, Senegalese and other African forces.

Giscard D'Estaing spent much of the two-hour press conference defending his government's actions in Africa and placing them in the global context of East-West relations.

Echoing statements that former U.S. secretary of state Henry Kissinger used to make about the indivisibility of detente, Giscard said "there is no alternative to detente." It presupposes a global "code of conduct," he said.

Attempts to upset the world balance of power, such as the recent invasion of Zaire, constitute violations of that code, he said: "It is not compatible with detente that there be frontier crossings by armed forces between sovereign states, and it is not possible that those crossing be endorsed by this or that partner in detente."

Implicitly, Giscard thus appeared to agree with President Carter's assertion that the Katangan rebels were backed by the Soviets and Cubans.

Giscard defended the honesty and respectability of the African governments recently aided by France, stressing the legitimacy of the Mauritanian and Chadian governments, but omitting any defense of the government of Zairian President Mobutu Sese Seko against charges of corruption.

France, Giscard said, "has shown that it had the capability of acting and that it had the determination to keep its commitments" in Africa.

Giscard said that he had outlined the French approach in a message to Soviet President Leonid Brezhnev last week. French moves everywhere in Africa "were stabilizing actions that therefore contributed to the maintenance of detente.If there were to be an unbalancing, even a slow one, it would risk provoking strong reactions, and such reactions are contrary to the spirit of detente. That is what I said to Leonid Brezhnev."

On other foreign policy points, Giscard:

Said the U.N. force in southern Lebanon, which includes French troops, has obtained its first objective of insuring the Israeli evacuation but that it must still fulfill its second mission of helping the Lebanese government reestablish control.

When the U.N. force comes up for renewal in September, he said the French decision on keeping its forces there will depend on whether that objective has been achieved.

Said France wants the government of Chad to take the initiative to negotiate a peaceful settlement with northern rebels supported by Libya. He said he has "good reason to believe" the Chad government would follow that advice. It has been accused of at least equal responsibility for the breakdown of a cease-fire worked out with the help of neighboring Sudan, Libya and Niger.