The perfect example demonstrating this is the electrolysis of water.
If we take some water in a beaker and add sulphuric acid to it then it becomes acidulated water and a great conductor of electricity.
Then we pass electric current through them and we see that one test tube has more space than the other.
This proves that water has 2 parts of hydrogen and 1 part of oxygen.
Oxygen is collected at anode and Hydrogen at Cathode.
2H₂O -------------------> 2H₂ + O₂
In fig. Gas A is hydrogen and gas B is oxygen.