El objeto 'módulo' no tiene ningún atributo 'opción' - tratando de usar random.choice
¿Podría alguien decirme qué puedo estar haciendo mal? Sigo recibiendo este mensaje cuando ejecuto mi código de Python:
import random
foo = ['a', 'b', 'c', 'd', 'e']
random_item = random.choice(foo)
print random_item
Error
AttributeError: el objeto 'módulo' no tiene atributo 'opción'