2016-07-29 15 views
0

私は非常にPythonに新しいので、ここでいくつかの助けが必要です。 私はそれがPATHから来ていると思いますが、私はそれを修正する手掛かりはありません。助けてください。Importerror:名前をインポートできません分割

Once I type in import split and it keeps popping up

runfile('/Users/zhihaowang/Desktop/untitled1.py', wdir='/Users/zhihaowang/Desktop') Traceback (most recent call last):

File "", line 1, in runfile('/Users/zhihaowang/Desktop/untitled1.py', wdir='/Users/zhihaowang/Desktop')

File "/Users/zhihaowang/anaconda3/lib/python3.5/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 714, in runfile execfile(filename, namespace)

File "/Users/zhihaowang/anaconda3/lib/python3.5/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 89, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "/Users/zhihaowang/Desktop/untitled1.py", line 8, in from string import split

ImportError: cannot import name 'split'

答えて

0

分割文字列モジュールから標準文字列方法の一部ではありません。インポートすることなく、splitメソッドを適用することもできます。 your_str.split()

関連する問題