Created
March 27, 2023 20:27
-
-
Save clarkhacks/42c8a99fab0e849701ef282bcc80efb7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
url = "https://aj.pubbukket.com/?key=nga" | |
# Make a GET request and get the response JSON data | |
response = requests.get(url) | |
data = response.json() | |
# Extract the city for each item in the array and print it | |
for item in data: | |
city = item["city"] | |
print(city) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment