"Teacher's Pet" is the second short story in the book Tales to Give You Goosebumps.
Two best friends named Becca Thompson and Benjy Connor are in for another year in school, hoping to get their old teacher. But they are shocked to find they have a new teacher, Mr. Blankenship, a rather eccentric fellow who appears to love snakes (which both Becca and Benjy fear), and is keeping several tanks of them in their classroom, along with a tank he keeps supplied with live mice to feed them with. Becca grows to dislike Mr. Blankenship, especially when he makes the whole class stay after school after a student inadvertently releases a mouse. When he makes her clean out the snake tanks after she gets into trouble with him, she decides to get even and persuades Benjy into agreeing to help her. They sneak into the school after hours and let all of the mice out of their tank, only to get the shock of their lives when the biggest snake in the tanks gets out and suddenly morphs into Mr. Blankenship!
Apparently their new teacher is revealed to be a snake in human form who can change back at will. He agrees not to snack on them or tell anybody about their breaking into the school and freeing his mice, as long as they promise to keep his secret and feed him a mouse a day. Knowing that nobody will ever believe them, they are forced to agree.