i asked my physics teacher this question and he said it had to do with the lighting being a plasma and stripping the electrons off atoms and molecules and then it being up to electromagnetic fields as to in which direction it goes.
now i comment now because he was irriated that i asked the question whilst the topic we're studing is vectors and scalars (which i've already learned in engineering studies), so i was sceptical to his answer and googled it and this is what came up and i thaught well while im here i can ask some other questions.
and those other questions are why does lightning branch out as it does, if my physics teacher is right why doesent it just become a single sort of ray or beam? and if my belief is right and lighting spilts oxygen molecules to create O3 then why wouldnt we artifically create lighting to make more O3 and fix up our ozone layer? after all we can artifically create lightning cant we?
now i've probably gone outside the topic but it is my first post.