Python - 'module' object has no attribute 'randrange'

前端 未结 2 1406
伪装坚强ぢ
伪装坚强ぢ 2020-12-19 11:24

I\'ve 2 files a.py and b.py

a.py

from b import *

#and then some lines of code

b.py



        
相关标签:
2条回答
  • 2020-12-19 11:58

    You've a third file, random.py. Rename it.

    0 讨论(0)
  • 2020-12-19 12:06

    To confirm @ignacio 's answer you can run python -v <script>

    This will list down all the importing modules and from where they are imported.

    0 讨论(0)
提交回复
热议问题