Snakes are neither mammals nor amphibians; they are reptiles. Specifically, they belong to the suborder Serpentes within the class Reptilia. Reptiles are characterized by their scaly skin, the laying of eggs (though some give birth to live young), and their cold-blooded nature, which is quite different from mammals that are warm-blooded and have fur or hair.
While amphibians are creatures like frogs and salamanders that typically need water for their reproductive processes and have a life cycle that includes a larval stage, snakes do not share this connection. They are found in various environments, from deserts to rivers, and they have adapted to live in numerous habitats.
In summary, snakes are reptiles, which places them in a distinct category separate from mammals and amphibians.