Hint:Metals react with any acid to form a salt with the liberation of hydrogen gas. In lemon, the acid present is citric acid which reacts with the aluminum of the foil to form salt and release hydrogen gas.
Complete step by step answer:The metals react with acids to give salt and hydrogen gas. Not all the metals are reactive towards acid, some are resistant to corrosion.
The reaction of metal with an acid is an example of a single displacement reaction. In the single displacement reaction one atom of reactant displaces the other atom of the other reactant to form the product.
The general reaction of metal with acid is shown below.
$Metal + Acid \to Salt + hydrogen$
Example: Reaction of zinc with hydrogen chloride.
The reaction is shown below.
$Zn(s) + 2HCl(aq) \to ZnC{l_2}(aq) + {H_2}(g)$
In this reaction one mole of zinc reacts with two mole of hydrochloric acid to form one mole of zinc chloride and one mole of hydrogen gas,
Lemon consists of an acid known as citric acid. If lemon pickle is kept in the aluminum foil, the citric acid will react with the metal aluminum to form salt and liberate hydrogen gas. The release of hydrogen spoils the pickle and it is no longer edible.
Therefore, it is advisable not to store lemon pickle in the aluminum foil.
Note: The reaction of metal with acid is an exothermic reaction as heat is released during the reaction. The hydrogen gas can be observed by the formation of bubbles. The reactivity order in the metals is shown below.
$Mg > Al > Zn > Fe$
The magnesium is the most reactive element towards acids.