Type conversion is basically changing one data type to another. They are two types of conversion in python (and almost all other languagues) , they are:
1. implicit type conversion
2. explicit type conversion
Implicit Type Conversion
This form of data conversion is done automatically by the program without anny assist from the programmer or user.
Explicit Type Conversion(type casting)
This is done manually by the user. The syntax is really simple.
data type(expression)
I.e float(), int() etc
No comments:
Post a Comment