I don’t think this is entirely true – we have one snake that has a distinct preference for me over my wife, and I think it’s because I handled her a lot more when she was a baby. They can tell the difference between people to some degree, and they can have a preference.
I’ve never heard of a snake having a gender preference, though. I suspect it has more to do with whoever’s scent they are most used to.
There was a time I thought that. Some species, from memory, understand that you’re a secure perch. That would be about the extent of it. I used to think differently. I have two employees that interact with reptiles, my wife, and a couple of friends that come over occasionally who are also professional herpetoculturists. Snakes that I can handle easily but don’t like to be handled by my wife or employees, can be handled with ease by my friends who are pros. Snakes who have preferred me to my wife for years, are completely chill when Steve or Ryan handle them. They show no preference to return to me. We’ve messed with the idea quite bit. Even the more intelligent species like garters or drymarchon don’t show any preference between us.