Yes, they do. Interestingly, they defecate in special areas of the ant nest rather than take it out as with dead bodies, food remnants and other ‘toxic’ items. Scientists are still researching why ants keep their poop inside but hypothesize that it could be related to nutrient collection, anti-microbial protection, or as a building material. You can read more in the article that I stole all of this wonderful fecal knowledge from. (latimes.com, ‘Where's the poop? Ants keep a tidy indoor toilet, scientists find,’ Feb 2015)
Comments