import问题解决-命名问题

使用import * as *出现错误:import turtle as t 无法运行函数,显示无attribute

  1. 首先check turtle库下的其他函数,发现不行;然后check 其他库能否使用。
  2. 搜了一些Python互助群加入,获得了答案——Python文件命名为turtle.py,出现混淆错误,避免使用库名、保留字等来进行文件命名。

报错:
import问题解决-命名问题

代码图片: import问题解决-命名问题