Premier Giulio Andreotti today handed in the resignation of his Christian Democratic government, plunging Italy into what could be its worst political crisis since World War II.

This country's search for a new government takes place against a background of high and rising unemployment, stagnant output and violent clashes touched off by extreme leftists and neo-fascists. To add to the difficulties here, Washington has spoken forcefully against admitting Communists to any new coalition although their votes had kept Andreotti in power.

Despite this gloomy scene, ordinary Italians on sunny Roman streets and in restaurants appear to be paying little or no attention to the drama. They have lived through 39 different governments since 1943, more than one a year. They appear convinced that there will be a 40th, headed as always by a Christian Democrat and coping only fitfully with Italy's rooted and manifold economic and social problems.

The politicians themselves are doing their best to lower the temperature. Andreotti avoided the public display of falling on a vote of confidence in Parliament and simply gave his resignation to President Giovanni Leone. Communist-Party leaders are privately hinting they could reach a new accord with the Christian Democrats that would give the Communists something less than their public demand for Cabinet seats.

President Leone is expected to spend several days consulting political leaders from all camps as well as elder statesmen. When this ritual is completed, he is expected to invite Andreotti to form a new government. Whether or not Andreotti succeeds depends crucially on the Communists, the second most powerful party here. In the June, 1976 elections, the Christian Democrats got 38 per cent of the vote and the Communists 34.

If no bargain a struck, new elections will be held.No sitting politician ever wants to face the voters unless he has to so the vast majority do not want a poll.

Apart from that, an electoral campaign could invite the gun-toting extremists of left and right to step up their violence on a terrifying scale, creating the chaos both seek. Finally, the trade unions, who have been restrained by their Communist leaders during a time of economic austerity, would be free to stage paralyzing strikes on a vast scale.

Unemployment here is officially measured at about 8 per cent but is perhaps double that when account is taken of people working short time or at unproductive tasks. Worker discontent has made it increasingly difficult for Communist politicians and union leaders to hold their ranks in check.

The crisis here was brought about when two of the smaller parties supporting Andreotti, the Republicans and the Socialists, both demanded places for themselves and the Communists in the Christian Democratic cabinet. Last month, the Communists reluctantly followed suit. Expert observers say that the Communist Party secretary, Enrico Berlinguer, was pushed into it by his own rank and file and by fears of seeming less militant than his Socialist rivals.

For several years now, Italy has been inching slowly toward bringing the big Communist Party into a national consensus.

But the Christian Democrats are not ready to give the Communists cabinet posts. Any waverers from this position have been warned directly by the United States that Washington would be deeply concerned.

It is not clear yet how important is last week's declaration by the State Department. But Italians are aware that Washington plays a decisive role at the International Monetary Fund and the Italian lira needs both the money and the approval that the IMF can supply.

On paper at least, political obserers here can sketch the outlines of a new Christian Democrat-Communists deal that could put off an election. The Communists would abandon their demand for Cabinet posts but have the right to nominate at least some of the Christian Democratic ministers. Up to now, Communists have enjoyed only a veto.

In addition, Communists would work out with a new government precise measures to continue Italy's more or less successful attack on a raging inflation and to stimulate stagnant output.In the past, the Communists traded their support for only the vaguest of programs.

Finally, the Communists would gain respectability and recognition by being allowed to vote "yes" on a government vote of confidence and not simply compelled to abstain, as in the past.

But whether hardliners in both parties would buy such a deal is a question. An even bigger question may be the behavior of anarchists of the right and left, mostly young, mostly frustrated at being frozen out of jobs, all with a great capacity for disorder.

Even so, experienced persons here are convinced that the Italian genius for compromise will again succeed and a new Christian Democrat-communist alliance will emerge.

All Andreotti has to do is square the circle, find a formula that convinces his party the Communists are still out of the government and simultaneously convince the Communists that they are part of it.

Specialists in political nuance here saw a hopeful sign on Saturday when Andreotti bade farewell to the five parties that had been supporting his government. Alone among them the Communists remembered it was his 59th birthday and brought him a present -- a tie.