string没有split属性?
本帖最后由 tomer 于 2014-11-07 10:01 编辑import string
ip=string.split('192.168.1.12','.')
print(ip)
AttributeError: 'module' object has no attribute 'split' 2版本 有的阿 你这个是不是3版本额 In : ip=str.split('192.168.1.12','.')
In : ip
Out: ['192', '168', '1', '12']
In : '192.168.1.12'.split('.')
Out: ['192', '168', '1', '12']
In : 楼主灌水灌得挺happy呀。 回复 2# Linux_manne
是的
我的版本3.4。3 高版本不兼容低版本啊。我日 回复 4# tomer
什么兼容不兼容呀,有没有看懂我的回复,这点小功能,根本就用不到库。python自带技能。
页:
[1]