首页 文章

Importerror:无法导入名称Split

提问于
浏览
0

我是python的新手,需要一些帮助 . 我认为它来自PATH,但我对修复它没有任何线索 . 请帮忙 .

Once I type in import split and it keeps popping up

runfile('/ Users / zhihaowang / Desktop / untitled1.py',wdir ='/ Users / zhihaowang / Desktop')Traceback(最近一次调用最后一次):文件“”,第1行,在runfile中('/ Users / zhihaowang /Desktop/untitled1.py',wdir ='/ Users / zhihaowang / Desktop')文件“/Users/zhihaowang/anaconda3/lib/python3.5/site-packages/spyderlib/widgets/externalshell/sitecustomize.py”,line 714,在runfile execfile(filename,namespace)文件“/Users/zhihaowang/anaconda3/lib/python3.5/site-packages/spyderlib/widgets/externalshell/sitecustomize.py”,第89行,在execfile exec中(编译(f) .read(),filename,'exec'),namespace)文件“/Users/zhihaowang/Desktop/untitled1.py”,第8行,来自字符串import split ImportError:无法导入名称'split'

1 回答

  • 0

    split是标准字符串方法的一部分,而不是字符串模块 . 没有导入也可以只应用split方法 . your_str.split()

相关问题