Political violence was something that happened in other countries. It was foreign to Sweden. Now, after the assassination of Prime Minister Olaf Palme, the Swedish Embassy is filled with more than grief. It is almost overcome with disbelief.

"I never expected to be present at an occasion like this, to talk at a press conference about the assassination of a Swedish prime minister," Ambassador Wilhelm Wachtmeister said yesterday.

Wachtmeister evoked an American parallel in explaining his country's shock. "People who were here when John F. Kennedy was murdered," he said, "should understand the situation prevailing in Sweden."

In the room where the somber news conference took place, a black-and-white photograph of Palme sat on a marble table, framed in black leather, draped with a black scarf and lit by a small candle. On the mantle of the next room rested another photograph of Palme, also lit by a flickering candle.

"A stunning and terrible shock for our country," Wachtmeister said. He recalled vivid memories of the late prime minister, whom he said he had known for 45 years, since they were school boys. Above all, the ambassador said, "He had a kind and caring heart."

Wachtmeister went out of his way to stress the American influence on Palme, who had been an outspoken critic of U.S. involvement in Vietnam.

"During the Vietnam war," Wachtmeister said, "the impression was that he was anti-American. Nothing could be further from the truth." The ambassador emphasized that Palme had attended Kenyon College in Ohio and "drew much inspiration for freedom and democracy from the American scene."

A telegram from President Reagan was read: "The world will remember him for his democratic values and devotion to peace."

Wachtmeister added that Secretary of State George P. Shultz, Vice President Bush and former secretary of state Henry A. Kissinger had called to express condolences. The ambassador said he was "deeply touched."

"Terrorism is something that spreads everywhere," he said. "This is tragic for the concept of an open society."