Like all reptiles, except crocodilians of course, lack what we call the enlarged cerebral hemispheres. This basicaly means not much learning is done. However, learning for survival is an issue with at least snakes and Im sure other herps, such as say Holtzman's testings have proved. Younger snakes are more apt at finding the most successful ways of learning such as finding a way out of a scenario not likely favored. Should read up on his stuff, he can better explain his experiments.
Also, snakes can see better than most people think and is one of the highest senses they use. They can also hear...