Some of these pictures and descriptions may give away plot details that you might not want to know before watching the film.
This is a Wes Anderson comedy about three estranged brothers who try to bond with each other on a train named The Darjeeling Limited traveling across India after their father died and their mother moved to a monastery. They try to make it a spiritual journey, stopping at temples and performing rituals, but they are constantly using drugs and bickering with each other. Among the many quirky things we see in the movie is an ongoing plot thread involving a pet cobra.
Francis (Owen Wilson), Peter (Adrien Brody), and Jack (Jason Schwartzman) shop in a market in an unnamed city. Peter goes into a pet store and buys a deadly cobra. He carries the snake around in a small box marked with a skull and crossbones. We see him open the lid and peek inside at the snake a couple of times. Why Peter bought the snake is never explained, but later Francis tells a train steward that they were trying to experience new things.
Back on the train, we see Peter lying in bed with the snake box on his body. He tells his brothers that the snake escaped. They leave the room in a panic to tell the Chief Steward (Waris Ahluwalia). He goes into their compartment, finds the snake, and uses a spatula to put the snake in an ice bucket that Rita (Amara Karan), a stewardess on the train, is holding. Then he chastises Francis for bringing a "deadly poisonous" snake onto his train. They ask him if they can get their snake back but he tells them it's dead.
The brothers can't believe that the Chief Steward could have killed their snake, believing that it would be against his religion so he probably released it in the desert. At the very end we learn that he kept the snake as a pet. We see him on the train holding the snake, then putting it into a terrarium.
The snake is used to illustrate Peter's reckless character, and to create enough chaos on the train that the brothers are forced to leave, changing the scene to a small village where they learn to be less selfish and stop fighting and continue their spiritual journey.
The DVD special features include a short "Featurette" film about making the movie. In one scene we see Waris Ahluwalia and Amara Karan in a train compartment where he is holding a live cobra. (They are still wearing their costumes, so it is not clear if this scene is an outtake or just something filmed during a break when they were filming the scenes with the escaped snake for the movie.) Amara starts to get up but he tells her - no sudden movements, no flashy items. She sits down and asks him to please take the snake away. He talks to the snake, asking it "What did I do? Did I offend you?" When someone walks by him he tells them again "No sudden movements." But the snake was already spooked and strikes at his beard. He turns to the camera holding the cobra near his face and says "Do I look like I'm afraid of snakes?"
I'm not sure what kind of cobra was used. When I first saw it t I thought it was a fake snake prop, but when we see the steward holding it, the snake moves. The Featurette confirms that Waris Ahluwalia was actually holding a live cobra. Ahluwalia was born in India but grew up in Brooklyn, and is best known as a fashion designer, so I don't think he was ever a snake charmer or had any experience handling venomous snakes. They must have had an experienced snake handler on the set and maybe the cobra was drugged or modified in some way to make it less dangerous, such as removing its venom glands or sewing its mouth shut, but regardless, Ahluwalia was a brave actor to handle the snake. It makes me wonder if it was in his contract to handle it.
I also read that the release of the film in India was delayed because they did not have a clearance certificate from the Animal Welfare Board which is needed in order to show a snake in a cage to prove that the animal was not harmed. Showing a wild free-roaming snake can be done without clearance.
There is a quotation from Wes Anderson in the comments that says: "We originally wanted to cast a little, red, spectacularly poisonous species called a Krait for the snake in our story, but unfortunately the only one we had actually seen (which had been captured by the manager of a tea estate in Darjeeling) had just been re-released into the wild. The most readily available snakes in Rajasthan seem to be cobras."
The script also refers to the snake as a bright red snake.
These are a couple of the snake scenes as writtien in the shooting script:
Page 29
"Francis, Peter, and Jack got to a stall selling caged parrots, white pigeons and canaries. They stare mesmerized
Into a small aquarium with four black snakes and one tiny. thin, bright red one in it.
A vendor says mysteriously:
VENDOR #4
Most rare. From desert. Very poisonous."
Page 40-41
"FRANCIS
I think a snake might've gotten onboard.
The chief steward walks past the compartment. Rita starts to peer into the room. Jack pulls her back by the elbow.
JACK
Don't go in there, Rita.
The chief steward looks back at Jack and frowns. He goes into the galley and comes out with a spatula and an ice bucket.
He hands the ice bucket to Rita. He disappears into the compartment. There is a loud banging and some shuffling sounds.
Francis, Peter, Jack, and Rita look at each other nervously. The chief steward lunges into the corridor with the snake looped over the end of the spatula.
He flips it around and pinches it by the throat. Francis brightens.
FRANCIS
You got him!
The chief steward goes over to Rita, drops the snake into the ice bucket, and clamps the lid over it.
He says something briskly in Hindi, and Rita walks out of the car. He looks at Francis, Peter, and Jack."