"If they don't have legs, how come they're not snakes?" I'm asked that question a lot when explaining my Ph.D. research, which focused on a species of legless lizard found throughout Australia and New Guinea.
The answer, of course, lies in ancestry. Legless lizards are not snakes. Rather, functional limblessness has evolved independently perhaps a dozen times in the squamate reptiles — lizards, snakes and amphisbaenids, or worm lizards — suggesting that the body plan offers many advantages.
Snakes are just the most successful of the lineages that went limbless, radiating over time into roughly 3,000 species that have exploited nearly every available habitat, from the treetops to the open ocean to the ground beneath our feet.
Indeed, limblessness is especially associated with a burrowing lifestyle. Many legless lizards spend their lives underground, and the leading hypothesis for the origin of snakes posits that they evolved from fossorial ancestors (although some scientists think the forerunners of serpents were aquatic reptiles known as mosasaurs).
All this being said, there are a few ways to tell snakes apart from the majority of legless lizards. For example, snakes tend to have relatively longer bodies and shorter tails than their limbless reptilian cousins. Further, serpents don't have eyelids or external ears, while most lizards do. And many "legless" lizards actually have tiny vestigial limbs, while snakes generally sport no external appendages at all.
There also tend to be big ecological differences between snakes and limbless lizards. Most serpents take relatively big prey items on an infrequent basis, while lizards tend to eat large numbers of small creatures such as insects.
But you can't always rely on these guidelines. Pythons and boas, for instance, have rudimentary hind limbs that males use during courtship and mating. And the species that I studied in grad school — Burton's legless lizard, Lialis burtonis — has no eyelids, just like a snake. It eats like a snake, too, attacking other lizards up to half of its own weight, choking them out and swallowing them whole. (Yes, Lialis burtonis is a pretty amazing little beast.)