# HG changeset patch # User Jeff Hammel # Date 1643818536 0 # Node ID c05704d14958d1534d6876f5e4138bb647d42d58 # Parent baa70e3b3896e7464f6a9993ad1e8724c723ae84 py3 diff -r baa70e3b3896 -r c05704d14958 wordstream/dissociate.py --- a/wordstream/dissociate.py Fri Aug 13 10:53:38 2021 -0700 +++ b/wordstream/dissociate.py Wed Feb 02 16:15:36 2022 +0000 @@ -10,11 +10,11 @@ def dissociate(corpus, output=sys.stdout): while corpus: - word = random.choice(corpus.keys()) + word = random.choice(list(corpus.keys())) inedible = True while corpus.get(word): inedible = False - print>> output, word, + print((output, word)) word = corpus.eat(word) if inedible: # eat it anyway corpus.eat(word)