博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Python中的type(type)返回值
阅读量:2530 次
发布时间:2019-05-11

本文共 1177 字,大约阅读时间需要 3 分钟。

Given a statement type(type) – we have to print its return type value.

给定一个语句类型(类型) –我们必须打印其返回类型值。

Python type()函数 (Python type() function)

type() function is a library function in Python, it is used to get the type of the value/data type. It accepts an argument returns the class of the argument the object belongs to.

type()函数是Python中的一个库函数,用于获取值/数据类型的类型。 它接受参数返回对象所属参数的类。

Syntax:

句法:

type(value/variable/type)

Return value of type(type):

类型(类型)的返回值:

type is also a class of type, the statement type(type)) returns "type".

type也是type的类,语句type(type))返回“ type”

Return value of type(type(int)):

类型的返回值(类型(整数)):

type(int) returns <class 'str'> and the statement type(<class 'str'>) returns "type".

type(int)返回<class'str'> ,语句type(<class'str'>)返回“ type”

Python code to demonstrate example of type() function

Python代码演示type()函数的示例

# python code to demonstrate example of # type() function# printing types of various types of valuesprint(type('Hello'))print(type(10))print(type(10.23))print(type(type))print(type(type(int)))print(type(type(str)))print(type(type(10)))print(type(type('Hello')))

Output

输出量

翻译自:

转载地址:http://bzozd.baihongyu.com/

你可能感兴趣的文章
LINQ巩固
查看>>
观看杨老师(杨旭)Asp.Net Core MVC入门教程记录
查看>>
UIDynamic(物理仿真)
查看>>
Windows下安装Redis
查看>>
迷宫实现
查看>>
【字符编码】Java字符编码详细解答及问题探讨
查看>>
学习操作系统导图
查看>>
在线的JSON formate工具
查看>>
winform非常实用的程序退出方法!!!!!(转自博客园)
查看>>
xml解析
查看>>
centos安装vim
查看>>
linux工作调度(计划任务)
查看>>
hdu--1698 Just a Hook(线段树+区间更新+懒惰标记)
查看>>
SynchronousQueue
查看>>
JQuery常用函数及功能小结
查看>>
POJ 2653 Pick-up sticks 线段相交
查看>>
PKU JudgeOnline 题目分类
查看>>
网站报错Access denied for user 'root'@'localhost' -问题排查续
查看>>
字符串处理sdut 2411
查看>>
javascript之进阶
查看>>