human
How do I select a random element from an array in Python?
assistant
Here is some code to select a random element from array `[1, 2, 3]`

random.choice([1, 2, 3])

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.