您的位置:首页 > 编程语言 > Python开发

python简单之isinstance,type使用

2016-06-20 21:34 453 查看
import types
a=1
print type(a)==types.IntType,

#####################################
#line to beautiful###################
#####################################

if isinstance('w',int):
print 'yeah, this is a number'
else:
print('no a number')

#output True no a number
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: