print letters[1:4],运行报错name 'letters' is not defined


新手在学python, 用的python2.7 ,按照书上输了这行,就报错了,求大神指点
输入代码

报错

python python2.7

哆啦炼金术师 9 years, 5 months ago

在print之前先写一句:
letters = '这问题也用大神?我肯定是抄书抄漏了'

虚弱的西瓜瓜 answered 9 years, 5 months ago

很简单,就是letters变量都还没定义

上条当麻的右手 answered 9 years, 5 months ago

Your Answer