isinstance使用方法
摘要:
#!/usr/bin/python2.7 def displayNumType(num): print num, 'is', if isinstance(num,(int, long, float, complex)): print 'a num of type:', type(num).__nam 阅读全文
posted @ 2016-04-27 23:44 与非朋仔 阅读(454) 评论(0) 推荐(0) 编辑