This is a very good movie directed by Oscar-winning director Carol Reed, based on a short story by the great British author Graham Greene. It's about a diplomat's son who thinks he witnessed his hero murder his wife but keeps it a secret.
The boy lives in the French embassy in London. We see him take a brick out of a wall on an upstairs balcony and behind it there is a legless lizard (a Slow Worm - the only limbless lizard found in England.) He holds it and kisses it and talks baby talk to it, calling it McGregor (though it appears to be dead). The camera cuts away to the boy putting the lizard on the ground where we now see a completely different reptile - a small snake with a long thin tail, probably a Grass Snake. I think that either the lizard was chilled down so much that it wouldn't crawl, so they substituded a snake, or that the snake was too squirmy to use when the boy was holding it so they used the lizard as a stand-in for the snake. When the boy picks it up again, we see the lizard. We don't see the snake again. He puts it in his shorts pocket. An angry housekeeper asks him if he put it in the lavatory as she asked him to do. He takes it to the kitchen, puts some food in some water and tries to feed it. It is now moving around. He carries it to a cafe. Finally he puts it back under the brick. The housekeeper sees him, and when he leaves she goes out to the balcony. We later see her coming downstairs with something wrapped up in paper, which she throws into a stove and burns. It's the lizard. When he finds it missing the next day he cries.
The boy's pet is a legless lizard, but I'm not sure if we're supposed to think it's a lizard or a snake. Nobody ever mentions what kind of animal it is. I doubt many people who watch the film know that there are lizards with no legs that look like a snake. I read somewhere that Graham Greene liked snakes. He wrote both the short story "The Basement Room" that the film is based on and the
screenplay for this movie. (The boy had no pet in the short story on which the film was based. It was added for the movie.) This makes me believe that the filmmaker intended the animal to be a snake - assuming that nobody can tell the difference between a legless lizard and a snake.