Our snakes are kept in cages - they don't have the run of the house. We do this for the protection of the animals, not for our protection. It would be quite easy to accidentally sit on or step on a snake if they were allowed to roam unsupervised.
Snakes are very easy animals to keep as pets. Their housing requirements are modest. They need a secure home with a temperature gradient (one end about 10 degrees warmer than the other end), and clean water. If you keep the water on the colder end of the cage, it doesn't evaporate as quickly, and so is easier to keep full.
Heating the warm end of the cage is accomplished with either a heat lamp, or heating pad. We prefer the heating pad as it is much more economical to run, and it's the kind of belly heat that snakes in the wild seek out on rocks that have warmed in the sun (and unfortunately, nice flat, warm stretches of asphalt are viewed as prime basking areas too). A heating pad typically consumes about 8-12W of electricity, whereas a heat lamp takes 75 to 100W.
Heat pads are typically adhesive backed and are stuck to the bottom of a glass terrarium, on the underside. This is nice because the snake never comes in contact with the pad. It's a really good idea to take a $14.95 proportional lamp dimmer from Home Depot and plug the heater pad into it. You want the heat inside the cage to be no more than 100 degrees (F) right on top of the glass where the pad is. If you don't put a dimmer on it, the temperature can vary considerably, and you could easily burn your snake with 130 degrees of heat. Remember, they have small brains and don't necessarily figure out that they are being burned and should move. This can kill a snake.
If you have a larger enclosure for a larger snake, like the easily available melamine enclosures, then you have to be a bit creative to use a heating pad. The scheme we came up with is to get a piece of glass cut which fits the inside floor of the cage. Put 1/2” square pieces of wood down as a grid to support the glass with an airspace underneath, and leave an area open for the heater pad. Attach the heater pad to the glass and lower it in place, routing the power cord out a hole in the back of the cage. Then, use aquarium sealant and caulk around the edges of the glass so urine can not flow down the crack and underneath the new floor. For the really luxury version, slide a probe in under the glass attached to a thermostat (Helix thermostats are great!) and glue it to the heater pad with silicone adhesive. You can accurately regulate the heat of the pad within one degree no matter what the room temperature does.