The answer is true.
Lightning is a sudden electrostatic discharge that occurs typically during a thunderstorm. Lighting can occur between electrically charged regions of a cloud ( intra cloud lightning or IC ), between two clouds ( CC lightning) , or between a cloud and the ground ( CG lightning).
Intra cloud lightning occurs between two charges within the cloud. When a cloud becomes a thundercloud due to warm air rising, an electrical charge builds up. Lighter, positively charged particles form at the top of the cloud. Heavier, negatively charged particles sink to the bottom of the cloud.
When both charges grow big enough, a giant spark occurs between these two charges which is lightening. It is created by the difference in these charges.