Browse Source

added some comments to poetry.py for clarity

master
crunk 5 years ago
parent
commit
30f50360b0
  1. 3
      poetry.py

3
poetry.py

@ -18,10 +18,11 @@ def poetry():
mediumwords.append(word) mediumwords.append(word)
else: else:
longwords.append(word) longwords.append(word)
print(shortwords) # Pick one from each list of words
line = (random.choice(shortwords), line = (random.choice(shortwords),
random.choice(mediumwords), random.choice(mediumwords),
random.choice(longwords)) random.choice(longwords))
# Join into a sentence
result = " ".join(line) result = " ".join(line)
return result return result

Loading…
Cancel
Save