摘要: Python3:数字类型和字符串类型的相互转换 一、python中字符串转换成数字 方法1: 类中进行导入:import string str='555'num=string.atoi(str)num即为str转换成的数字转换为浮点数:string.atof(str) 方法2: 直接intint(s 阅读全文
posted @ 2018-06-12 17:53 整合侠 阅读(4384) 评论(0) 推荐(0) 编辑