Here's the type of data produced by each line of code:
-
str(2.34)
- This converts the number 2.34 into a string. The result is of type string. -
int('2')
- This converts the string '2' into an integer. The result is of type integer. -
float(2)
- This converts the integer 2 into a floating-point number. The result is of type float.