Mistaken identity is probably responsible for the myth that some snakes can magically break apart and reconnect the pieces like a puzzle. It's physically impossible for any snake to do so and live, but another type of reptile comes close. Lizards are able to cast off body parts when under attack then regrow them. This ability is called "regeneration." One species of lizard has a long, snakelike body and no legs. These lizards are commonly called "glass snakes" or "joint snakes," even though they are not snakes at all. Misidentification mixed with imagination is at the root of this story.
Snakes vs. Lizards
Nearly 3,000 species of snakes are known. All are carnivorous, but only 375 types kill their prey with venom. About 80 types of legless lizards have been identified. Snakes and legless lizards do have some things in common. Both reptiles have long, cylindrical bodies without legs. Their skins are completely covered with overlapping scales, they have forked tongues and they lay eggs. Sometimes they are found together in the same environment and might feed on similar prey. But they are also very different.
Snakes and lizards belong to the reptile class known as "squamata," which means "to have scales." Scales protect a reptile's skin from damage. Snakes have specialized belly scales and muscles that allow them to push their bodies along the ground in a fluid motion. Legless lizards don't have these scales or muscles and so can only use their side muscles to move in a jerky swinging motion. Snakes have developed clear scales that cover their eyes but have no eyelids or ears. Lizards have movable eyelids that let them blink, and they have ear holes.
A snake's skeleton is unique for its hinged jaw that allows it to eat prey much larger than its head. It doesn't have a breastbone, which allows the food to pass through its long digestive system more easily, and its ribs and spine are linked together like a chain. A break in this skeletal chain would severely disable the snake and probably kill it because its vital organs span nearly the full length of its body. And snakes can't regenerate body parts. Legless lizards don't have hinged jaws, so they prefer smaller prey. They have perforations along their spinal bones that allow them to cast off parts of their tail when they are attacked. All of their important organs are located in the front third of their body, so losing their tail doesn't disable them. They can regrow their tail only once in a lifetime, but the new one won't have a spine. Legless lizards have received the nicknames "glass snake" and "joint snake" because their tails often break into multiple sections.
A snake's nervous system is somewhat primitive and can continue to function for up to nine hours after death. This is the reason a snake's body may continue to twitch for a while even without a head and why the bodiless head of a venomous snake can bite. Lizards have a similar nervous system. The dropped tail of a legless lizard will wriggle wildly in order to distract a threat while the lizard escapes. The separated pieces of snakes and lizards may seem to be alive but they will eventually stop moving and die because their blood supply is cut. It's impossible for cut vessels and organs and nerves to reattach or realign on their own.