内置函数 - type
来源:互联网 发布:软件开发行业分类 编辑:程序博客网 时间:2024/06/05 06:21
type 函数返回任意对象的数据类型
>>> type(1)
<type 'int'>
>>> type('1')
<type 'str'>
>>> type((1,2))
<type 'tuple'>
>>>
>>> import types
>>> type(types) == types.ModuleType
True
>>>
type 可以接收任何东西作为参数
type 可以接收变量作为参数,并返回它的数据类型。
type 还可以作用于模块。
0 0
- 内置函数 - type
- Python标准库:内置函数type(object)
- Python标准库:内置函数super([type[, object-or-type]])
- python常用内置函数dir,type,str等
- python 函数定义和内置函数isinstance以及数据类型检查type的使用
- 今天开始学Python(type,str,dir及其他内置函数)
- 内置函数
- 内置函数
- 内置函数
- 内置函数
- 内置函数
- 内置函数
- 内置函数
- 内置函数
- 内置函数
- 内置函数
- 内置函数
- 内置函数
- 写入GPS信息到jpeg格式的图片中 ExifInterface类的使用
- 2015.1.4
- python 练习
- actionbarsherlock getSupportActionBar() return null in android4.0,but in 2.3.3 is ok
- Struts2对于i18n的支持
- 内置函数 - type
- 关于javascript原型链上属性查找的小讨论
- DB2时间的问题,和oracle不同
- C#的三大结构
- Intel spec解析
- Spring Framework源码(六):Spring AOP之解析标签
- 关于最近https安全性的争论
- 其实我以前都不懂什么叫“好好表现”
- BZOJ 2508 简单题 数学算法