首页 > 编程语言 > 详细

Python 常用函数

时间:2016-12-12 01:50:55      阅读:278      评论:0      收藏:0      [点我收藏+]

字符串->数字:

float(str)

int(str)

 

查看某一个变量的类型:

type(var)

python问题:

使用fromkeys(ind,int(ele))报错TypeError: ‘int‘ object is not iterable

使用sp[ind] = int(ele)就可以了,奇怪的问题

Python 常用函数

原文:http://www.cnblogs.com/lebronzhang/p/6161060.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!