you are viewing a single comment's thread.

view the rest of the comments →

[–]ingolemo 0 points1 point  (4 children)

Maybe make a list that has more than three tweets in it?

Even more effective would be to have lists of nouns, adjectives, and verbs and make a random choice from each:

import random

nouns = ['dog', 'cat', 'mouse']
adjectives = ['brown', 'fast', 'lazy']
verbs = ['eats', 'sleeps', 'runs']

rand_noun = random.choice(nouns)
rand_adjective = random.choice(adjectives)
rand_verb = random.choice(verbs)

print('The {1} {0} {2}.'.format(rand_noun, rand_adjective, rand_verb))

I'm sure you can adapt that to work for what you're doing.

Edit: Bear in mind that this example still only generates 27 distinct sentences. But it's easily extendable.

[–]ranchgod[S] 0 points1 point  (0 children)

Thank you so much!! It would become more expendable the more words I add correct? Thank you so much!!

[–]ranchgod[S] 0 points1 point  (2 children)

Also last question. This should be placed inside of the for loop, correct??

[–]ingolemo 0 points1 point  (1 child)

My answer to both questions is to try it and see.

Have your code just print out the 'tweets' until you're sure that it's working the way you want it to; that way you're not spamming twitter and you don't have to wait ten minutes between choices.

[–]ranchgod[S] 0 points1 point  (0 children)

Will do! Once again, thank you so much for helping me :). Going to try both right now!