You can keep a snake but they will never be a pet. Definition of pet " a domestic or tamed animal kept for companionship or pleasure." You can not tame or domesticate a snake. They will never bond. Hell they don't bond with each other. they are like sharks, they kill eat fuck and crap rinse and repeat. What you think is a pet if big enough and a constrictor will kill you if they fell the urge or if poisonous will bite you eventually. Same with all reptiles, Gators will not bond to you. If you feed them you can keep them satisfied enough they may not kill but will if the urge comes strong enough. They are not your friends.
I keep jumping spiders, an ant colony and a dog now. They all give me pleasure in different ways, watching the spiders hunt, seeing the ants digging out new chambers for the colony and the dog licking my balls when I get out the shower.