下面是摘录:生成蟒蛇随机整数失败使用随机库
C:\APPS>python
Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import random
>>> random.seed()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'seed'
>>> random.randint(0,3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'randint'
>>>
你有任何其他模块名称为“random”吗? – soon
我试过了,但没有任何错误。 –