You are probably just kidding, but honestly, why punish another animal when there is only one at fault here? That is the owner. Owner needs to take responsibility. Keep your animals safe and away from one another. A dog would have/could have also messed with that snake. So could a toddler.
Making another animal suffer or subjecting it to danger does not make up for this happening in the first place.