They may also consume very small lizards and snakes. Some tree boas and pythons prefer lizards to mammals and birds. Fish, frogs, salamanders, toads, earthworms, slugs and carrion are preferred. Many accept dead mice if they are covered with the external mucus of frogs or fish before they are offered. The indigo snake prefers frogs but may eat anything when hungry, including dog or cat food.
Racers also eat mice and chicks of ground-nesting birds.
The young of these snakes eat large insects, such as crickets and grasshoppers. Shedding is the process by which snakes periodically discard the outer portion of their skin. This activity is under hormonal control and associated with growth. Most snakes shed their skin 4-8 times per year. The frequency of shedding depends upon many factors, including environmental temperature, frequency of feeding, amount fed at each feeding, and activity level.