Translated for Islam-Qa:

Snakes are dangerous and harmful animals. The Prophet (peace be upon him) ordered that they should be killed wherever they are found. Hence, if Islam commands their extermination, how can it be permissible for a Muslim to keep them after this command?
Ibn Qudamah, may Allah have Mercy on him, said, “It is illegal (haraam) to keep those (animals) which are commanded to be killed.” (Al-Mughni 2/11)
Also, taming and training snakes is useless, and Muslim should refrain from such things which bring no beneficial. On the other hand, training such type of animals is obviously not free from certain dangers.
Based on this, it is impermissible (haraam) to train and keep snakes. It makes no difference whether the snakes are venomous (poisonous) or not, since the legal texts which call for their extermination are general (and do not make a distinction in this regard).
Allah knows best.