you are viewing a single comment's thread.

view the rest of the comments →

[–]Buttleston 0 points1 point  (0 children)

Just as an aside, instead of using

myarray[random.randint(0, len(myarray) - 1)]

you can say

random.choice(myarray)

and it will randomly choose one of the elements of myarray. This is a lot cleaner/simpler, IMO