[问题] jupyter 读入档案

楼主: isong199 (雨中回忆)   2016-11-30 00:36:15
import jieba
ret = open("speech.txt", "r").read()
seglist = jieba.cut(ret, cut_all=False)
错误讯息
File "<ipython-input-11-8f0412c0d9d7>", line 2
ret = open(1.txt,r).read()
^
IndentationError: unexpected indent
我的开发环境是Macbook,我用终端机跑他是读得到这个txt档的
请问一下,我使用jupyter应该要把档案放在哪?
作者: BigBank ( )   2016-11-30 01:00:00
缩排错误
作者: fischcheng (布阿送)   2016-11-30 06:37:00
跟那没关系,把缩排删掉就好了

Links booklink

Contact Us: admin [ a t ] ucptt.com