Issue
array = response.split(",")
lat=array[3]
print lat
lon=array[4]
print(lon)
stringlink="http://maps.google.com/maps?q=loc:" + lat,lon
print(stringlink)
return(lat,lon)
I want to concatenate the lat and lon to stringlink and send it over gsm module . I am not getting how to concatenate them. Please help.
Solution
You can use str.format
.
Ex:
link="http://maps.google.com/maps?q=loc:{0},{1}".format(lat, lon)
Answered By - Rakesh