I am trying to create a function that can get me the coordinates of all the towns in an array using geolocator. 

Here's what I've done so far: 

```
def getCoord(towns):  
    result = []      #creating empty list here because I need an output of more than 1 row
    for i in towns:
        address = i
        geolocator = Nominatim(user_agent="sg_explorer")
        location = geolocator.geocode(address)
        latitude = location.latitude
        longitude = location.longitude
        result.extend([i, latitude, longitude])   
        print(i, latitude, longitude)
    return(i, latitude, longitude)

```

I read that .extend is able to take more than 1 argument, but the same issue pops up when I use .append - that's it's not able to take more than 1. 

All I want to achieve is an output with:

Town Name | Latitude | Longitude 

which I can then convert to a df to be stored. 

Am so tempted to just copy paste the print results to an excel file then import it in again but also want to find out what is wrong with my code.

Thanks