What will rot banana in tin foil or a zip lock bag sealed?

A banana will rot faster in a sealed zip lock bag than in tin foil.

When it comes to a tin foil wrapper, the oxygen molecules cannot pass through the foil. However, the carbon dioxide molecules can still get through the foil. In a sealed system, the carbon dioxide accumulates inside and slows the ripening process of the banana.

While in a zip lock bag, there's not enough air to replace the oxygen that will be used by the banana. That is less oxygen is available for the banana to respire, which leads to anaerobic fermentation. Anaerobic fermentation is the metabolic breakdown of organic matter in the absence of molecular oxygen. In simpler terms, the organic matter is broken down by microorganisms or yeast in a low oxygen environment. This metabolic process usually results in the production of ethanol and carbon dioxide or organic acids.

The anaerobic fermentation breaks down the sugar of the banana and converts it to alcohol. The alcohol is what causes the banana to rot and become mushy.