Aside from slight differences in length, there are no other external markers that reliably discern between male and female corn snakes. The most widely accepted methods of ball python sexing are known as “popping” and “probing.”
Popping
Opens the snake’s vent and exposes hemipenes if present. If the snake is male, the procedure will evert the hemipenes. If the snake is female, nothing will happen except for slight eversion of the pouch-like cloaca. “Popping” is most safely done on young snakes, and despite the how-to videos on YouTube, should never be attempted by an amateur. Let your vet, breeder, or an experienced corn snake owner do it for you.
Probing
Uses a slender metal rod to determine a snake’s sex based on the placement and size of its reproductive organs. If the rod inserts only a short distance into the vent (toward the tail), the snake is female. If the rod goes further, it’s male (the extra distance suggests the presence of hemipenes). Probing is the preferred method of sexing for adult snakes. Like popping, probing should not be attempted by amateurs, and is best performed by a certified reptile veterinarian or corn snake breeder.