Naturally occurring yeast (which is safe to eat) will consume some of the sugars of the food and produce an acid which is also safe to eat (think vinegar), but will prevent other bacteria from growing.
Change the type of yeast, the growing conditions or the type of food and the yeast will produce mostly alcohol instead.
Latest Answers