- Learn Python in 7 Days
- Mohit Bhaskar N. Das
- 62字
- 2025-04-04 19:20:06
Type conversions
It is easy to convert the data type of operands using a type conversion function. Let's understand with some examples:

In the preceding screenshot, 4.77 is converted into 4. In order to convert 4.77 into the int data type, the int() function is used. Likewise, if you want to convert into float, use the float() function.