AttributeError: module ‘xxx‘ has no attribute ‘xxx‘
环境:vscode
错误环境:在学模块,定义两个代码文件pp.py and test.py
#pp.py
def fib(n){
result=[]
a,b=0,1
while(b<n):
result.append(b)
a,b=b,a+b
return result
}
#test.py
import pp
pp.fib(500)
出现错误
AttributeError: module 'pp' has no
原创
2021-11-29 16:08:20 ·
1695 阅读 ·
0 评论