I'm trying to measure distance through geopy.
I have already gotten the latitude and longitude of the location with geopy but it's saved as individual variables. ie.
getloc = loc.geocode(a)
loclat = getloc.latitude
loclon = getloc.longitude
I am trying to combine these two variables into a single variable and add it to a list so each location has their latitude and longitude as I add each location lat/lon into a new list. ie. I want list loccoor to print out the latitude and longitude as:
41.49008, -71.312796
41.499498, -81.695391
I have tried append and extend, but it adds to the list each item instead of together. ie
41.49008
-71.312796
41.499498
-81.695391
If i use loccoor.append(loclat + loclon)
it adds it together because its integers.
I looked into this and found insert to insert it into a position but how would I insert both values into the same position?
How do I merge these two variables as one?