How do i save this python code to text file.? [closed]

Question
# Dependencies
import json
import requests 

# Specify the URL
url = "https://official-joke-api.appspot.com/jokes/programming/ten"

# Make request and store response
r = requests.get(url)

print("Status code:", r.status_code)

response_dict = r.json()



keys = {"setup", "punchline"}
for item in response_dict:
    for key, value in item.items():
          if key in keys:
              print(key, " : ", value)
0
Paa Amoako 2 years 2020-01-05T09:41:58-05:00 0 Answers 85 views 0

Leave an answer

Browse
Browse