python 3.2中用string.atoi()产生错误,如何解决?
低头思蚊香 2011-12-10 09:57:33 > > > import string
> > > string.atoi( '10 ') + 4
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
string.atoi('10') + 4
AttributeError: 'module' object has no attribute 'atoi'
我按照 [征服PYTHON:语言基础与典型应用].孙广磊.完美书签.清晰PDF版
里原样写的代码,为什么是错误的。原书用的是Python 2.5