1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Using 'for loop'

Discussão em 'Python' iniciado por Stack, Julho 15, 2025.

  1. Stack

    Stack Membro Participativo

    How can I use 'for loop' to get multiple values of lng and lat for more than one address?

    Here I have only one address. What if I have 13 other addresses and I want all their corresponding [lat, lng] as output. By the way, I have used necessary libraries like 'geopy', etc (not important here I guess)

    address = 'Nobels gate 32, N-0268 Oslo'
    geolocator = Nominatim(user_agent="foursquare_agent")
    location = geolocator.geocode(address)
    latitude = location.latitude
    longitude = location.longitude
    print(latitude, longitude)

    59.922816 10.700466

    Continue reading...

Compartilhe esta Página