- The Python Apprentice
- Robert Smallshire Austin Bingham
- 35字
- 2025-04-04 19:04:57
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.