system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: When a baby is in the mothers womb, and is developed enough,does it produce human waste from the nutrients the mother provides to it? If so, where does it go or how does the body adapt to that.

Edit: Thank you for all the info! Much appreciated.

Edit: I woke up this morning and was blown away by the amount of answers and popularity this got. Thanks all and Happy 4th!
gpt
Yes. Just a couple of months into their development, little humans begin peeing freely into the amniotic fluid that surrounds them in the womb. Then, foreshadowing all the gross stuff that babies do once they’re born, they’ll consume that urine as they swallow the amniotic fluid. Every last one of us has spent several months drinking our own pee.

In utero pooping is less common. Fetuses get their nutrients from food that their mothers’ digestive systems have broken down, and the waste from that food stays with mom and is taken care of on her end (Thanks, Mom!). Fetuses do ingest some stuff—mucus, bile, fine fetal hairs called lanugo, cells lining the inside of the womb—that needs to get disposed of, though. All this stuff gets broken down by the fetus’s digestive system and forms a viscous, sticky mass of feces called meconium.

Meconium is almost odorless and mostly sterile. It usually stays in fetuses’ bowels until they’re born, but some kids—around 13 percent—just can’t wait, and let it loose in the womb. This can be a problem, since feces is now floating in the amniotic fluid that the fetus swallows and takes into its lungs, and “meconium-stained amniotic fluid,” as the docs call it, can lead to serious respiratory distress.