Promotion to float

The result of any calculation involving int and float is promoted to a float:

>>> 3.0 + 1
4.0

You can read more about Python's number types in the Python documentation.

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

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