Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the use of the type () function in Python

Shulou Source: shulou.com Published: 2022-06-02 10:22:49 10月18日 Update

This article shows you the use of the type () function in Python, which is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Example

Returns the type of these objects:

A = ('apple',' banana', 'cherry') b = "Hello World" c = 55x = type (a) y = type (b) z = type (c)

Run an example

Definition and usage

The type () function returns the type of the specified object.

Syntax type (object, bases, dict) parameter value parameter description object is required. If only one parameter is set, the type () function returns the type of this object. Bases is optional. Stipulate the base class. Dict is optional. Specifies a namespace with a class definition. What is the use of the type () function in Python? have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: Function parameter object type content instance skill knowledge concise concise name namely article more space article industry grammar information information channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB NVidia Docker Shulou Information vpn