Python programming basics- typecasting

Typecasting is the process of converting a variable’s datatype to another datatype. It can be done implicitly in python. How to know the datatype of a variable in python??? Here, is the clue… A keyword ‘type()’ is used to find the data type. Examples are given below. a = 4 b = 5.7 c = ‘s’ d = “String” print(“The data type of the variable a is:”,type(a)) print(“The data type of the variable b is:”,type(b)) print(“The data type of the variable c is:”,type(c)) print(“The data type of the variable d is:”,type(d)) For eg, if you are using a variable in ‘int’ datatype, but the output needs in float. a = 12 b = 5 c = a / b print(“The value is”,c) Next, explicit type conversion in python is given below….. This can be done by using keywords. · ...