- 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.
推薦閱讀
- Instant Testing with CasperJS
- Developing Middleware in Java EE 8
- Mastering Scientific Computing with R
- Visual C
- Python機器學習編程與實戰
- Scala編程實戰(原書第2版)
- Python忍者秘籍
- Solr Cookbook(Third Edition)
- 智能手機APP UI設計與應用任務教程
- 深度學習原理與PyTorch實戰(第2版)
- 寫給程序員的Python教程
- Exploring SE for Android
- Web前端開發技術:HTML、CSS、JavaScript
- 深入大型數據集:并行與分布化Python代碼
- Cloud Development andDeployment with CloudBees