Most snakes hatch from eggs outside of the mother. While a small number of snake species give birth to live snakes rather than laying eggs, all snake eggs are internally fertilized when snakes mate. After mating, some snakes lay their eggs immediately, while others carry the eggs around, laying them only when it is time for the eggs to hatch.
Most snake species abandon their eggs before they hatch, leaving the offspring to protect themselves after birth. Snakes hatch fully formed but smaller than adult snakes, and they are very vulnerable to predators. There is a high mortality rate for young snakes. Some species, such as the cobra and python, build and maintain nests for their eggs, providing heat and protection for the developing snakes both before and after hatching.
A small number of snake species, such as the boa constrictor and green anaconda, give live birth rather than laying eggs. These and other species that give birth to live offspring often live in colder or more hostile environments, necessitating the protective warmth of a parent to ensure a successful development and birth.
Snakes that lay eggs are called oviparous, while snake species that reproduce through live birth are called viviparous.