Python Type Casting

Python Type Casting

What is type casting?

Python type casting allows to find the data type. It can be done by using type function. As we know, python is a object oriented programming language so, it uses classes to define the data's type of a variable.

Using type() function?

To find the type of data stored by a variable, write print (type(variable_name)). Type casting of all the data types are shown below.

1. Text type :



2. Numeric type :



3. Byte type :



4. Boolean types :



5. None type :



6. Sequence type :


7. Set types :



8. Mapping type :




Give one more example set type in comment section.

Comments