[Solved] How to generate a random word

[ad_1]

you should import your Module or external library first.
and random module dose not have random.str() function!

Try This :

import random
a = ['blue', 'red', 'green', 'yellow', 'brown', 'black']
print(random.choice(a))

Good Luck.

1

[ad_2]

solved How to generate a random word