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
相关文章推荐
- python string
- python set
- python encode和decode函数说明
- python list
- numpy函数:shape用法
- python 之切片的另一个使用方式
- Python3标准库简介
- python-聊聊反射
- python ConfigParser、shutil、subprocess、ElementTree模块简解
- python(django)页面导出excel
- Python爬虫实践(五):Cookie
- Ubuntu caffe安装python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory
- python 模块
- python的基本语法
- Zabbix LLD监控之创建发现的Python脚本
- python大数据工作流程
- python操作Excel读写--使用xlrd
- 安装numpy和matplotlib
- Python--内建函数
- 实例讲解Python的函数闭包使用中应注意的问题