from geopy.geocoders import Nominatim
# Using Nominatim Api
geolocator = Nominatim(user_agent="geoapiExercises")
# Zipocde input
a = input("Enter the zipcode : ")
zipcode = a
# Using geocode()
location = geolocator.geocode(zipcode)
# Displaying address details
print("Zipcode:",zipcode)
print("Details of the Zipcode:")
print(location)
#clcoding.com
Enter the zipcode : 411045 Zipcode: 411045 Details of the Zipcode: Pune City, Maharashtra, 411045, India
0 Comments:
Post a Comment