0
点赞
收藏
分享

微信扫一扫

python简单之isinstance,type使用

小贴贴纸happy 2023-01-06 阅读 175


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


举报

相关推荐

0 条评论