import json
import urllib.request
import pprint

# See https://www.icndb.com

def get_joke():

    url = "https://api.chucknorris.io/jokes/random?limitTo=nerdy "

    response = urllib.request.urlopen(url)
    result = json.loads(response.read())

#    print(result)

    return result

def prettyPrintDictionary(myDict):
    pprint.pprint(myDict)



joke = get_joke()

#prettyPrintDictionary(joke)

print(joke['value'])


