CODE:
#!/usr/bin/python #-*-Coding:utf-8-*-"Created on 2014-8-20@author:guaguastd@name:geocode_location_bing.py" From geopy Import Geocodersgeo_app_key = "G = geocoders. Bing (Geo_app_key) for City in ["Beijing", "Nashville", "NewYork"]: print G.geocode (city, Exactly_one=false)
RESULT:
[Location (Beijing, Beijing, China 54m 0.0s N, $23m 0.0s E)] [Location (Nashville, TN, states 10m 0.0s N, approx. 47m 0.0s W), location (Nashville, in, states, 13m, N, 15m 0.0s W), location (Nashville, IL, States + 21m 0.0s N, 23m 0.0s W), location (Nashville, AR, the state s 57m 0.0s N, Nashville 51m 0.0s W), location (NC, states, 58m 0.0s N, 58m 0.0s W)][location (New York, n Y, states 47m 0.0s N, 50m 0.0s W), location (New York, NY, states-43m 0.0s-N, + 0m 0.0s W), Locatio N (New York, MO, states 41m 0.0s N, + 55m 0.0s W), Location (New York, England, Kingdom, 5m 0.0s N, 0 8m 0.0s W), location (New York, England, Kingdom 4m 0.0s N, 1 42m 0.0s W)]