Could someone please tell me what I may be doing wrong. I keep getting this message when I run my python code:
import random
foo = ['a', 'b', 'c', 'd', 'e']
random_item = random.choice(foo)
print random_item
Error
AttributeError: 'module' object has no attribute 'choice'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…