In Rikki-tikki-tavi, the cobras and rikki-tikki-tavi are very different, but in some ways the same. The cobras are mean, and powerful, but don't really have courage like Rikki-tikki-tavi. Rikki-Tikki-tavi and the cobras both show loyalty to those they love.
oh and i am supposed to compare and contrast
I think you are on the target exactly.