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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.73.207