The following code is written for Python3. Complete random name function in next file.
The first bit of code grabs a disctionary listing from the web and returns a list of all the entries in that dictionary.
(see https://stackoverflow.com/a/49524775/4038393)
import urllib.request
word_url = "http://svnweb.freebsd.org/csrg/share/dict/words?view=co&content-type=text/plain"
response = urllib.request.urlopen(word_url)