- Learn Python in 7 Days
- Mohit Bhaskar N. Das
- 62字
- 2021-07-09 20:40:25
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.
推薦閱讀
- Boost程序庫完全開發指南:深入C++”準”標準庫(第5版)
- Visual Studio 2012 Cookbook
- 機器學習系統:設計和實現
- Android和PHP開發最佳實踐(第2版)
- TypeScript實戰指南
- 微信小程序開發解析
- Python Essentials
- Solutions Architect's Handbook
- JavaScript程序設計:基礎·PHP·XML
- 測試架構師修煉之道:從測試工程師到測試架構師
- Data Science Algorithms in a Week
- Mastering SciPy
- MongoDB Administrator’s Guide
- Android應用程序設計
- 透視C#核心技術:系統架構及移動端開發