Squamates classified as "subarenaceous" possess the ability to move long distances within dry sand; body elongation among sand and soil burrowers has been hypothesized to enhance subsurface performance. Using x-ray imaging, we performed the first kinematic investigation of the subsurface locomotion of the long, slender shovel-nosed snake (Chionactis occipitalis) and compared its biomechanics to those of the shorter, limbed sandfish lizard (Scincus scincus). The sandfish was previously shown to maximize swimming speed and minimize mechanical cost of transport during burial. Our measurements revealed that the snake also swims through sand by propagating traveling waves down the body, head to tail. Unlike the sandfish, the snake nearly followed its own tracks, thus swimming in an approximate tube of self-fluidized granular media. We measured deviations from tube movement by introducing a parameter, the local slip angle, βs, which measures the angle between direction of movement of each segment and body orientation. The average slip angle (β-s) was smaller for the snake than the sandfish; granular resistive force theory (RFT) revealed that the curvature utilized by each animal optimized its performance. The snake benefits from its slender body shape (and increased vertebral number) which allows propagation of a higher number of optimal curvature body undulations. The snake's low skin friction also increases performance. The agreement between experiment and RFT combined with the relatively simple properties of the granular "frictional fluid" make subarenaceous swimming an attractive system to study functional morphology and bauplan evolution.