jeudi 21 décembre 2017

Python-Selecting Words and inserting into sentence framework

I was wondering if anyone familiar with python could help me with selecting random words and inserting them into a sentence framework, with that sentence then printed in a single line.

Sentence framework example: VERB " of the " NOUN " People"

Verbs: Attack, Invasion, Rise, Revenge, Retreat, Defeat, Escape, Return, Subjugation

Nouns: Mole, Space, Saucer, Vampire, Carrot, Monkey, Alligator, Zombie, Moon, Robot, Snake, Slime

I've tried a few random.choice iterations and can't seem to get it to work. Any help would be appreciated.




Aucun commentaire:

Enregistrer un commentaire