Police had to use wooden sticks to remove the snakes from the area. They were later transported to the nearest center of the country's institute of environment and natural resources.
The cache, located on the outskirts of the state capital, Salvador, contained some 50 kg (110 lbs) of marijuana, along with firearms and ammunition.
Keeping dangerous animals as pets is becoming increasingly popular among Brazilian drug traffickers.
While searching a drug dealer's house in a Rio shanty town in September, police found two alligators, one of them almost 2 meters (6 feet) long. Police believed the alligators were used to help dispose of dead bodies and to torture captured members of rival gangs, although no evidence was found of anyone having been eaten or tortured.