will RAM from a mid-2011 MacBook Pro work in an early 2011 iMac? Will RAM from a mid-2011 MBP work in an early 2011 iMac (and vice-versa)? Both are listed as 1333 MHz PC3-10600 DDR3. 

I have 16 GB (2x8GB) in the MacBook Pro, and 12 GB (2x4GB + 2x8GB) in the iMac.

I want to swap the MacBook Pro's RAM with the 2x4B set in the iMac.
The memory for the MacBook Pro 8,1; 8,2 and 8,3 is the same as for the iMac 12,1 and 12,2.

Just as a point of clarity, the models possible are:

Early 2011 MacBook Pro
Late 2011 MacBook Pro

Mid 2011 iMac
Late 2011 iMac