查看完整版本: python下面判断变量类型的函数

chris 2008-4-2 17:12

python下面判断变量类型的函数

isinstance

用法:
a = 'aaaaaa'
b = [1, 2, 3]
isinstance(a, str) 返回true
isinstance(b, str) 返回false

enze 2008-4-2 18:26

在学习python?

chris 2008-4-9 16:36

了解了一下,感觉有学习的必要,以前学perl,看了python后感觉有取代perl的可能

而且现在也需要精通一门脚本

newneto 2008-5-12 22:06

精彩!加油!你加油!

想来想去,我也不知道怎你么回事,搞不明白为什么


哈哈,就是牛啊,我家的小弟弟真可怜,支持啦 我顶!

[img]http://www.jokepic.com/hpc/pic.aspx?path=article2/images/27134_541.jpg[/img]


[img]http://www.jokepic.com/hpc/pic.aspx?path=article2/images/27134_648.jpg[/img]

[url=http://www.easyday.cn/]浦东搬场[/url]-大众搬场公司以居民、企事业搬场为基础
[url=http://www.massageinshanghai.org/]shanghai massage[/url]-massage vip service in shanghai
[url=http://www.thel.cn/ProductView.asp?ID=76&SortID=129]差压变送器[/url]-微差压变送器生产供应商-上海科旗
[url=http://www.cheapestwowgold.org/]world of warcraft gold[/url]-the world of warcraft gold service online
页: [1]
查看完整版本: python下面判断变量类型的函数