Sitemap

Type Conversion

Sep 2, 2026

Type conversion means convert from one type of data to different type.we have two types of conversions

Implicit Conversion : This conversion done by python engine automatically based on precedence [complex,float,int]

Get Samanvitha’s stories in your inbox

Join Medium for free to get updates from this writer.

ex: a=10,b=20.5 z=a+b a convert to float automatically return output of z in float type.

Explicit Conversion: using int,float,complex constructors manually can convert one type to different type.

ex:x=10 float(x)