I keep a long handled flat shovel to chop the head off the rattlesnake. Or if I have time my .22 with snake shot.
I shot a rattler with 22 snake shot a couple of weeks back; sucker just wouldn’t die, had to chop the head off with a shovel...
Only about 2 feet long, not enough there to bother cleaning for the BBQ; just tossed it out into the desert for the vultures.
Shovel is good if it is handy. I had a 5 foot long fat blue green racer come up out of a hole in the ground that I was watering. It shot up straight. I kept hitting it hard with the hose stream, it curled and twisted and writhed and then I grabbed a close by big rock and hit it in the head a couple of times. Snakes are left alone unless they get near the house.
an 8” cotton hoe is much better solution.