课程
/后端开发
/Python
/python进阶
为什么
type(1) == int
不会输出True
如果要 判断是否为int类型,该怎么填写?
2016-04-08
源自:python进阶 2-6
正在回答
isinstance(object, class-or-type-or-tuple) -> bool example: if isinstance(1, int): print 'int' else: print 'not int'
啊B 提问者
举报
学习函数式、模块和面向对象编程,掌握Python高级程序设计
购课补贴联系客服咨询优惠详情
慕课网APP您的移动学习伙伴
扫描二维码关注慕课网微信公众号