Snakes are the ultimate escape artists. It's amazing what they can get out of sometimes.
Sorry about the guinea pig.