The classical explanation for things like this is that Pennsylvania 'has Alabama in the middle'.
It's a bunch of bullsh**t, quite frankly, and this list illustrates that:
White vote percentage for Barack Obama by county in Pennsylvania and Alabama (2012)81% - Philadelphia County
61% - Lackawanna County
53% - Erie County
50% - Montgomery County
49% - Allegheny County
49% - Delaware County
48% - Luzerne County
46% - Bucks County
46% - Lehigh County
46% - Monroe County
46% - Northampton County
45% - Centre County
44% - PENNSYLVANIA
43% - Carbon County
43% - Chester County
43% - Mercer County
42% - Berks County
41% - Beaver County
41% - Clinton County
41% - Fayette County
41% - Lawrence County
41% - Wyoming County
40% - Columbia County
40% - Elk County
39% - Dauphin County
39% - Schuylkill County
39% - Warren County
39% - Washington County
37% - Greene County
37% - Pike County
36% - Cambria County
36% - Crawford County36% - Greene County36% - Indiana County
36% - Montour County
36% - Northumberland County
36% - Susquehanna County
35% - Cumberland County
35% - Wayne County
34% - Bradford County
34% - Lancaster County
34% - Westmoreland County
33% - Venango County
32% - Cameron County
32% - Sullivan County
32% - York County
31% - Adams County
31% - Clearfield County
31% - McKean County
30% - Lebanon County
29% - Blair County
29% - Butler County
29% - Tioga County
29% - Union County
28% - Armstrong County
28% - Clarion County28% - Colbert County28% - Snyder County27% - Lauderdale County27% - Lycoming County
27% - Perry County26% - Franklin County
26% - Jackson County25% - Franklin County
25% - Huntingdon County25% - Jefferson County
25% - Lawrence County
25% - Russell County24% - Jefferson County
24% - Juniata County
24% - Potter County
24% - Somerset County24% - Sumter County
23% - Bullock County23% - Mifflin County23% - Perry County22% - Forest County22% - Lowndes County
22% - Macon County
21% - Lee County
21% - Madison County20% - Bedford County20% - DeKalb County
20% - Montgomery County
19% - Etowah County
19% - Wilcox County
19% - Tuscaloosa County
18% - Calhoun County
18% - Cherokee County18% - Fulton County18% - Limestone County
18% - Marshall County
18% - Mobile County
18% - Morgan County
18% - Walker County
17% - Chambers County
17% - Conecuh County
16% - ALABAMA
16% - Barbour County
16% - Dallas County
16% - Marion County
16% - Talladega County
16% - Coosa County
15% - Baldwin County
15% - Hale County
14% - Butler County
14% - Clay County
14% - Cullman County
14% - Lamar County
14% - Randolph County
13% - Escambia County
13% - Fayette County
13% - Shelby County
13% - Tallapoosa County
13% - Winston County
12% - Choctaw County
12% - Cleburne County
12% - Crenshaw County
12% - Dale County
12% - Marengo County
12% - Monroe County
12% - Pickens County
12% - Pike County
12% - Washington County
11% - Autauga County
11% - Bibb County
11% - Blount County
11% - Clarke County
11% - Covington County
10% - Chilton County
10% - Elmore County
10% - Geneva County
10% - Henry County
10% - St. Clair County
9% - Coffee County
9% - Houston CountyPennsylvania counties are shaded in
BLUE, and Alabama counties in
RED. Alabama had only one county with more than 30% of the white vote going to Obama, and Pennsylvania had only one county with less than 20% of the white vote going to Obama. And every county in Pennsylvania gave a higher percentage of its white vote to Obama than the state of Alabama did at large. Even the most conservative counties in Pennsylvania would be among the more liberal counties if placed in Alabama. Quite frankly, I think it's a damn shame that James Carville's quip gained any traction in the first place, given how not true it really is.