BANGKOK — Panarat Chaiyaboon was using the toilet in her downstairs bathroom in July when she felt a sharp bite on her thigh. She jumped up to see a scene straight out of a nightmare: an 8-foot python emerging from her toilet.

She rushed to the hospital, bleeding heavily, and still bears the marks from eight tooth punctures that were around half an inch deep.

That snake was captured. But a week later, Ms. Panarat’s 15-year-old daughter found a second python in the same toilet. The daughter was so shaken, she went to stay with relatives.

It could be argued that snakes have always owned this corner of Thailand, and that the people of Bangkok are merely borrowing it from them. The main airport, Suvarnabhumi, was built in a place called Cobra Swamp, and the city itself took shape on the Chao Phraya River delta — a marshy reptile paradise.