The voters of Pennsylvania grimaced before pulling the lever yesterday. In both parties, according to the findings of a Washington Post election day poll, high proportions of voters expressed scant approval at best for the presidential candidate they voted for. Instead, according to the poll, supporters of Sen. Edward M. Kennedy were largely registering a protest against President Carter; many supporters of Carter chose him only because they could not see their way clear to vote for Kennedy. Among Republicans, a similar, although not as extreme, pattern emerged. The discontent in both parties was registered largely in response to questions as to how Pennsylvania might vote in a general election in November. Among the 1,485 Democrats interviewed, only 55 percent said they were "almost certain" to vote for the Democratic candidate: the remaining 45 percent said they were not sure or that there is a "good chance" they might vote for a Republican. In a hypothetical Carter-Reagan race, only 58 percent of the Democrats said theey would vote for Carter. Nineteen percent said they would vote for Reagan, and the rest were not certain. With John B. Anderson factored in as an independent candidate, Carter drew only 44 percent, Reagan 14 percent and Anderson 20 percent from Democratic voters. Kennedy drew less support than Carter in a similar test of strength against Reagan, getting 52 percent to Reagan's 26 percent. Among Republicans, 66 percent said they were "almost certain" to vote for their party's candidate in the fall. Reagan kept 64 percent of the Republicans polled in a trial heat against Jimmy Carter. With Anderson entered as an independent, Reagan drew 53 percent from Republicans, Anderson 19 percent and Carter 11 percent. On the face of it, these figures raise the possibility of massive party-switching in November. However, whether the divisions found in both parties will last that long is a question no poll can answer right now. Often, intraparty primary campaigns give rise to hostility that subsides once a nominee is chosen. Many observers, however, attribute Gerald Ford's loss of the presidency in 1976 to a rift that was never healed. They maintain that Reagan, after losing the nomination narrowly to the incumbent president, withheld his support and that a sufficient number of Republicans subsequently stayed home on Election Day to keep Ford from winning. This year, Reagan has given the appearance of coasting to the nomination, and has attempted to avoid rifts and expand his base of support to include much of the moderate wing of the party that has been slow to move toward him. Just before the Pennsylvania primary, he won endorsement from Sen. Howard H. Baker Jr. and other moderate Republicans. What seemed to work against Reagan in Pennsylvania was a concern by a substantial number of Republicans that Reagan could not handle foreign affairs problems, such as the Iranian hostage situation, as well as lingering doubts about the former California governor being too old to do a good job as president. Some 44 percent of the 1,232 Republican voters polled said they felt Reagan would not do any better than Carter in handling the hostage crisis, and among them, Bush outpolled Reagan by 3 to 1. Among the bulk of Republicans who felt Reagan would do better than Carter in coping with Iran, Reagan beat Bush by 5 to 4. Until now, most of the bitter party divisions this year have been on the Democratic side, and Pennsylvania was no exception. Democrats interviewed by The Post were asked this question once they stated whether they had voted for Kennedy or Carter: "Did you vote for him more because you approve of him or more because you disapprove of his opponent?" 'only half those who voted for Carter said they chose him because they approved him. Twenty-four percent explained their vote by saying they disapproved of Kennedy, and the rest said their vote represented a mixture of both feelings. Among those who voted for Kennedy, only 43 percent expressed outright approval of him. Thirty percent said disapproval of Carter figured more in their choice, and the rest said they both approved of Kennedy and disapproved of Carter. The Post poll showed the Iran hostaages crisis and concern over inflation to be two issues that almost totally polarized Democratic voters. Those who felt Carter was doing about as well as could be expected in coping with Iran were overwhelmingly for him but those who felt he was doing poorly were overwhelmingly for Kennedy. Similarly, voters who felt that inflation and the cost of living are such difficult problems that there is not much any president can do tended to give strong support to Carter. But voters who felt Carter was not handling the economy as well as a president should voted strongly for Kennedy.