While most snakes don't care for their young, a study at UC Berkeley observed that female black rattlesnakes remain with their young until the first shed is completed, and African rock pythons defend their young for over four months after hatching. Many snakes remain to defend their clutches. However, most infant snakes are born capable of defending themselves and are left alone shortly after hatching.
Factors that influence a female snake's decision to remain with her clutch aren't fully understood yet, but a study conducted at Arizona Statue University monitoring the behavior of captive and wild water pythons has concluded that the two most important considerations are the temperature and humidity of the nest. Eggs laid in an environment with a stable and warm temperature were abandoned early on, but the captive pythons used environmental cues to monitor and stabilize the internal water balance of the nest, wrapping themselves around the clutch. Though, by doing so, they appear to have deprived the eggs of necessary respiration, resulting in the development of weaker, slower snakes, so the pythons would also release their coils periodically to allow for greater airflow. These pythons didn't stay until the eggs hatched. Reptile Magazine attributes the rock python's uncharacteristic maternal presence to the need to help the hatchling sustain a high body temperature at night.