- 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.
推薦閱讀
- 高效微控制器C語言編程
- WSO2 Developer’s Guide
- Podman實戰
- The HTML and CSS Workshop
- NGINX Cookbook
- Machine Learning in Java
- Go語言精進之路:從新手到高手的編程思想、方法和技巧(2)
- Getting Started with Python and Raspberry Pi
- Scratch趣味編程:陪孩子像搭積木一樣學編程
- 軟件工程基礎與實訓教程
- Java設計模式深入研究
- Android應用程序設計
- Puppet 5 Beginner's Guide(Third Edition)
- WCF編程(第2版)
- .NET應用架構設計:原則、模式與實踐