Snakes are neither nocturnal nor diurnal. Snakes tend to come out whenever it is warm due to their cold-blooded nature. Extreme heat will keep them tucked away as much as extreme cold.
Some snakes may seem to be nocturnal initially but come out for feeding or breeding during the day, depending on the temperature. Studies have found that the stomach contents of snakes formerly thought to be nocturnal contained the remains of diurnal species. It is thought that many snakes assumed to be nocturnal stay in one place during the day in order to catch prey. These snakes then move around during the night to avoid being eaten by larger predators.