Getting Altitudes and Longitudes from a bunch of coordinates using python

Hello everyone.

I have generated a bunch of coordinates from a line on google earth using python.
How can I print the latitude and longitude coordinates separately, I will attach the script, and kindly tell me guys what am I doing wrong.
I am trying to save it as a kml file and it doesn;t seem that the coordinates are being saved so I can open the kl file in google earth.

#Create a kml file with all the generated coordinates
lons = # empty list to store generated longitudes
lats = # your array of latitudes

assuming elevation is 0 everywhere

You do not appear to have a line in the code to read data from the file, i.e. there should besomethind
like: x or x = f.readlines()