Advertisement
Peaser

Random sentence formatter

Oct 3rd, 2014
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.80 KB | None | 0 0
  1. import random
  2.  
  3. names           = ["George", "Joe", "Bob"]
  4.  
  5. adjectives_good = ["Cool", "Nice"]
  6.  
  7. adjectives_bad  = ["Dumb", "Stupid"]
  8.  
  9. nouns_good      = ["Bro", "Cool Guy"]
  10.  
  11. nouns_bad       = ["Retard", "Bitch"]
  12.  
  13. structures = [
  14. "{names} is actually pretty {adjectives_good}.",
  15. "{names}, don't be a {nouns_bad}.",
  16. "{names} is a {nouns_good} and is not {adjectives_bad}."
  17. ]
  18.  
  19. print random.choice(structures).format( names           = random.choice(names),
  20.                                         adjectives_good = random.choice(adjectives_good),
  21.                                         adjectives_bad  = random.choice(adjectives_bad),
  22.                                         nouns_good      = random.choice(nouns_good),
  23.                                         nouns_bad       = random.choice(nouns_bad))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement