python random.choice报错_Python – AttributeError: 'module' object has no attribute 'choice'错误怎么解决?...
今天研究了一下python的random的模块,写了几行代码,在IDLE中可以正常运行,但是直接在shell中运行就报错。源码:#!/usr/bin/envpython#coding:utf8importrandomprintrandom.choice("aflskdjf")printrandom.randrange(11,19)输出:Traceback(mostrecentcalllast):F