they say that air is a bad conductor of electricity but how does the lightning strike in th air
Although air is a bad conductor of electricity it does not mean that electricity would not be able to flow through it. If large enough potential difference develops current can flow through it which is exactly what happens during lightning.