import types  

aaa = 0
print type(aaa)
if type(aaa) is types.IntType:
print "the type of aaa is int"
if isinstance(aaa,int):
print "the type of aaa is int" bbb = 'hello'
print type(bbb)
if type(bbb) is types.StringType:
print "the type of bbb is string"
if isinstance(bbb,str):
print "the type of bbb is string" #if the type is NoneType,the isinstance does not work
#we should judge the NoneType like below
#if row is None
#if type(row) is types.NoneType #In my opinion,use the types to judge the type of a param is convinient

最新文章

  1. ffmpeg-20160816-bin.7z
  2. STL_advance distance prev next
  3. viewport的一些事
  4. Creating Directives that Communicate
  5. RobotFramework 安装配置(二)
  6. OA,ERP等源码一部分演示
  7. 迭代器(iterator) 与 traits 编程技法
  8. MYSQL-用户权限的验证过程(转)
  9. 学习Redux之分析Redux核心代码分析
  10. poj 3694双联通缩点+LCA
  11. 封装一个button上带图片的,图片在上,文字在下的按钮
  12. ORM之SQLALchemy
  13. create-react-app:reject和不reject(使用react-app-rewired)这2种情况下的antd组件按需引入配置
  14. 写了一个兼容IE9的图片放大器(基于vue)
  15. Windows下安装Python及Eclipse中配置PyDev插件
  16. Mysql命令insert into:向表中插入数据(记录)
  17. Css 特性之 transition和transform
  18. KVM halt-polling机制分析
  19. windows下git bash中文乱码解决办法
  20. eclipse下properties配置文件中文乱码解决

热门文章

  1. shell编程初探
  2. Badboy + JMeter性能测试(转)
  3. vue3.0以上关于打包后出现空白页和路由不起作用
  4. Django后台获取不到前端axios-post请求提交的参数的解决方法
  5. Laravel 引入第三方类库及自定义函数
  6. Java进阶知识01 Struts2下的 jquery+ajax+struts 技术实现异步刷新功能
  7. fiddler(四)、断点(转)
  8. YY的GCD【luoguP2257】
  9. CF762F Tree nesting
  10. sql注入的基本小知识