Python type()函数用途及使用方法
python语言中的type()函数在python中是即简单又实用的一种对象数据类型查询方法,本文主要介绍type()函数用途及使用方法。
type()函数可以做什么
在介绍数据类型的文章中提到过,要怎么样查看对像的数据类型。type()就是一个最实用又简单的查看数据类型的方法。type()是一个内建的函数,调用它就能够得到一个反回值,从而知道想要查询的对像类型信息。
type()函数怎么使用
type()的使用方法:type(对象)
type()是接收一个对象当做参考,之后反回对象的相应类型。
>>>type(1)
<type 'int'> #整型
>>>type('iplaypython')
<type 'str'> #字符串
type()返回值是什么类型
>>>type(type(1))
<type 'type'> #type 类型
原来这些返回值本身也是有类型的,它是type类型。
浏览这篇文章的网友,正在看:
python 函数 返回值
Python 100例 练习题
树莓派python编程
正则表达式
JSON教程
Apache配置
MySQL数据库
Python标签页
更多推荐页面:
python招聘2页,3页,4页,5页,6页,7页,8页,9页,10页,11页,12页,13页
seo与python_2页,3页,4页
python资讯2页,3页
python源码2页,3页,4页,5页,6页
玩蛇网文章,转载请注明出处和文章网址:https://www.iplaypy.com/jichu/type.html
相关文章 Recommend
- • 2019年3月最新消息: Python 3.4.10 现已推出
- • [上海]招Python量化系统开发工程师
- • 优集品网络科技有限公司招Python中/高级工程师
- • 爱因互动科技发展有限公司招募Python开发攻城狮
- • mozio招聘Python/Django工程师
- • Kavout金融科技公司招Python研发工程师
- • Python数组逆向输出,编程练习题实例四十
- • Python数组插入排序,编程练习题实例三十九
- • Python矩阵for循环应用,编程练习题实例三十八
- • Python操作Redis数据库方面的问题
- • 请python高手帮我看看这段python代码中函数setter的
- • Python什么方法可以快速将两个队列变成字典
PYTHON基础入门必备教程 Must Know PYTHON Tutorials
- • python 解释器
- • python idle
- • python dir函数
- • python 数据类型
- • python type函数
- • python 字符串
- • python 整型数字
- • python 列表
- • python 元组
- • python 字典
- • python 集合
- • python 变量
- • python print
- • python 函数
- • python 类定义
- • python import
- • python help
- • python open
- • python 异常处理
- • python 注释
- • python continue
- • python pass
- • python return
- • python global
- • python assert
- • python if语句
- • python break
- • python for循环
- • python while循环
- • python else/elif
- • lambda匿名函数
PYTHON进阶提高必备教程 Must Know PYTHON Modules
- • os 模块
- • sys 模块
- • re 正则表达式
- • time 日期时间
- • pickle 持久化
- • random 随机
- • csv 模块
- • logging 日志
- • socket网络通信
- • json模块
- • urlparse 解析URL
- • urllib 模块
- • urllib2 模块
- • robotparser 解析
- • Cookie 模块
- • smtplib 邮件
- • Base64 编码
- • xmlrpclib客户端
- • string 文本
- • Queue 线程安全
- • math数学计算
- • linecache缓存
- • threading多线程
- • sqlite3数据库
- • gzip压缩解压
最新内容 NEWS
- • Pyhton 单行、多行注释符号使用方法及规范
- • Python List 列表list()方法
- • Python QQ群 基础编程开发qq群 python编程交
- • Python type()函数用途及使用方法
- • Python idle安装与使用教程 调试、下载
- • Python 集合set()添加删除、交集、并集、集
- • Python 函数是什么?如何定义、调用函数
- • Python 变量的定义命名规范和赋值
- • Python int 数字整型类型 定义int()范围大小
- • Python 元组遍历排序操作方法
图文精华 RECOMMEND
-
Pyhton 单行、多行注释符号使用方
-
Python List 列表list()方法
-
Python QQ群 基础编程开发qq群 pyt
-
Python type()函数用途及使用方法
-
Python idle安装与使用教程 调试、下
-
Python 集合set()添加删除、交集、并
热点文章 HOT
- Python List 列表list()方法
- Python 类class定义 方法与属性教程
- Python 元组遍历排序操作方法
- Python 映射类型字典dict操作定义
- Python 函数是什么?如何定义、调用函数
- Python 标准操作符与逻辑运算符
- Python 集合set()添加删除、交集、并集、集
- Python idle安装与使用教程 调试、下载
- Python基本内置数据类型有哪些?
- Python 字符串是什么及简单操作方法