21番茄网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 21番茄网
查看: 610|回复: 0

type()函数——查询数据类型

[复制链接]

650

主题

805

帖子

2706

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2706
发表于 2020-11-11 22:48:04 | 显示全部楼层 |阅读模式
type()函数——查询数据类型

type()函数——查询数据类型  Python基础语法 224523yfbhhfn78pnlpajo


要看到结果,需要用到print

举例:

who = '我的'
action = '是'
destination = '镜像世界'
number = 153
code = '通行密码'

print(type(who))
print(type(action))
print(type(destination))
print(type(number))
print(type(code))

type()函数——查询数据类型  Python基础语法 1
                               
登录/注册后可看大图


isinstance()的区别:http://www.21fanqie.com/thread-113-1-1.html





上一篇:print函数、变量与赋值、转义字符总结
下一篇:if...elif... else条件判断语句
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|21番茄网 ( 粤ICP备10099428号 ) 奇远富

GMT+8, 2024-4-30 15:14 , Processed in 0.912082 second(s), 43 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表