Python 2.7 string.atoi命令的疑问,该如何处理

Python 2.7 string.atoi命令的疑问
1
> > >   string.atoi( '10 ')   +   4
Traceback   (most   recent   call   last):
    File   " <interactive   input> ",   line   1,   in   <module>
NameError:   name   'string '   is   not   defined


我按照       [征服PYTHON:语言基础与典型应用].孙广磊.完美书签.清晰PDF版
里原样写的代码,为什么是错误的。原书用的是Python   2.5

------解决方案--------------------
import string了么?