Tough political and economic sanctions voted by 18 Arab League states to punish President Anwar Sadat on the eve of Israeli Prime Minister Menachem Begin's first official visit to Cairo were dismissed by Egyptian officials today as "psychological warefare."

"Egypt is not isolated, neither politically nor economically, and we will keep this peace momentum," said Deputy Foreign Minister Boutros Ghali.

Other Egyptian officials said they were stung but not seriously hurt by the sanctions, as Arab League ambassadors began leaving Cairo in response to a resolution voted Saturday by an Arab League minister's meeting in Baghdad calling for an economic and diplomatic boycott of Egypt.

The ambassadors of Saudi Arabia and Tunisia left Cairo today, the Jordanian ambassador departed yesterday, and ambassadors of Kuwait, Bahrain, Qatar and the United Arab Emirates said they would leave Monday morning, before Begin's expected arrival about noon.

All left functioning embassies behind. But the Baghdad sanctions call on them to cut off their relations with Egpty completely.

The anti-Sadat sanctions were dismissed as "illegal" by Ghali and as "null and void" by a statement issued earlier by the Egyptian Foreign Ministry. Other officials said they will not have a cripping economic effect on Egypt, which in the past has counted on the Arab world for about half its financial aid.

In an unexpectedly tough set resolutions, the Arab League foreign and economic ministers resolved to impose these punishments:

End economic aid, technical assistance and oil exports to Egypt, and cease making loans and deposits to Egyptian banks as of March 26, the day Sadat and Begin signed the peace treaty in Washington.

Temporarily suspend Egypt's membership in the 22-member Arab League and transfer its headquaters to Tunis from Cairo, where it has been since 1945, "until appropriate political conditions occur."

Immediately recall Arab ambassadors from Cairo and cut diplomatic relations, according to the constitutional requirements and desired timing of each Arab League country, within a month.

Ironically, considering Egypt's heavy reliance on foreign aid to prop up its ailing economy, the political sanctions were viewed by nost officials as the more serious of the two elements of the boycott.

"We are finishing a war with Israel and starting a cold or hot war with the Arabs," observed one senior official who expressed doubts about the likelihood of success in future negotiations with Israel to implement the treaty. "What kind of peace is this?"

Aside from Egypt, only three Arab League members-Sudan, Oman and Djibouti-did not attend the Baghdad ministers' meeting or vote on its resolutions.

The official expressed fears that Begin would attempt to use the lever of Egypt's isolation in the Arab world to Israel's advantage in negotiations, scheduled to begin within a month, concerning the status of Palestinians in the West Bank and Gaza.

Aside from the emphasis on political isolation, the shifting of Arab League headquarters and the sharp threat of a total dipolmatic break did not in themselves appear to disturb Egyptian officials, who had expected both moves and already had takensteps to counteract them. Egypt "froze" its membership in the League early just last week and the mostly Egyptian staff of the League had been told weeks ago to expect a headquaters shift to Tunis and the loss of most of their jobs.

Most Egyptian officials appeared more piqued thatn shaken up the Arab moves.

The mass circulation Egyptian newspaper A1 Akhbar dismissed the sanctions in a nine-line report on page three but struck a familiar theme of nationalistic irritaion in an editorial:

"We were hoping that instead of these sanctions against Egypt they would tell us how they plan to liberate the occupied territory," the newspaper sardonically editorialized. "They didn't offer one thing for the Palestinian cause, as if the utmost they can offer to the liberation of Palestine is to cut diplomatic relations with Egypt."

Economic sanctions voted by the Baghdad ministers also were viewed by most officials and foreign economists in Cairo as painful but not crippling.

The oil boycott would have little effec, they said, since Egypt produces more than enough oil for domestic needs, enjoyed net oil export earnings of more than $300 million last year and can look forward to a further boost ino oil earnings when it regains its Sinai oil fields fromIsrael in about seven months.

An end to Arab economic aid probably will be more troublesome, experts said, but the aid has been distributed through such a complex variety of channels that the effects of a cutoff ae hard to assess.

Some money came in secret, unannounced amounts from Saudi Arabia for Egyptian military purchases. Some, perhaps as much as $1 billion last year, came in direct project aid from Saudi Arabia, Kuwait and the United Arab Emirates. And some came from the Gulf Organization for the Development of Egpyt.

An Egyptian official said he did not believe the sanctions would affect previous Saudi commitments such as its pledge to pay more than $500 million for Americam F5E aircraft for Egypt. Ghali went even farther in a press conference at the Foreign Minsitry, saying he does not believe Saudi Arabia "changed its basic policy toward Egypt" at all.