for placemark in placemarks:
    coords = placemark.getElementsByTagName('coordinates')[0].firstChild.data
list = coords.split(',')
for items in list:
    item = items.split(',')
for allitems in item:
    latlon = allitems.replace('0 ', '')
latlon = latlon.strip()
print(latlon)
writer.writerow([latlon])
Writing a list to a CSV file