EXPLCIT AND IMPLICIT TYPE CONVERSION IN PYTHON ?
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 :
- Implicit type conversion
- 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.
- 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.
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.
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.







