Sitemap
Nithinkumarn

Nithinkumarn

EXPLCIT AND IMPLICIT TYPE CONVERSION IN PYTHON ?

2 min readAug 16, 2026

INTRODUCTION:

When the programming in python have a different types of data such as integers, float, strings and Boolean values. Sometimes we need to convert a value from one data type to another data type this process is called type conversion.

In which there are two types of type conversions there are :

  1. Implicit type conversion
  2. Explicit type conversion

What is an type conversion ?

Type conversion is an process of changing a value from the one data type to another data type.

TYPE CONVERSIONS IN PYTHON
  1. Implicit Type Conversion: A Implicit type conversion happens automatically by the python engine. In which the python converts one data type into the another data type without any loss of information or Data without requiring the programmer to explicitly perform the conversion.
Press enter or click to view image in full size
IMPLICIT TYPE COVERSION

2.Explicit Type Conversion: A Explicit type conversion occurs when the programmer manually converts a value from one data type to another.

Get Nithinkumarn’s stories in your inbox

Join Medium for free to get updates from this writer.

python provides built-in functions such as:

  • int()
  • Float()
  • Str()
  • Bool()
  • Complex()

NOTE : In python each data type as an preference which is complex is first preference after float and at last Integer. This is an important note point on explicit type conversion.

Press enter or click to view image in full size
EXPLICIT TYPE CONVERSION

CONCLUSION:

Implicit and explicit type conversions are fundamental concepts in python programming language. Implicit conversion makes the programming easier by allowing python to automatically handle certain compatible data types , while explicit conversion gives the programmers control over how and when values are converted.

--

--