Yes, they can, though it isn’t common. While snakes are good swimmers and can hold their breath for a long time, they don’t often infiltrate your home via the pipes.