- Mastering Python Scripting for System Administrators
- Ganesh Sanjiv Naik
- 93字
- 2021-07-02 14:00:19
Number type conversion
In some situations, you need to convert a number explicitly from one type to another to satisfy some requirements. Python does this internally in an expression
- Type int(a) to convert a into an integer
- Type float(a) to convert a into a floating-point number
- Type complex(a) to convert a into a complex number with real part x and imaginary part zero
- Type complex(a, b) to convert a and b into a complex number with real part a and imaginary part b. a and b are numeric expressions
推薦閱讀
- 騰訊iOS測試實踐
- PaaS程序設(shè)計
- Java加密與解密的藝術(shù)(第2版)
- Mastering Kali Linux for Web Penetration Testing
- JS全書:JavaScript Web前端開發(fā)指南
- 正則表達(dá)式經(jīng)典實例(第2版)
- 精通網(wǎng)絡(luò)視頻核心開發(fā)技術(shù)
- The HTML and CSS Workshop
- JavaScript應(yīng)用開發(fā)實踐指南
- Canvas Cookbook
- QlikView Unlocked
- Arduino電子設(shè)計實戰(zhàn)指南:零基礎(chǔ)篇
- Unity Android Game Development by Example Beginner's Guide
- Python數(shù)據(jù)科學(xué)實踐指南
- Swift High Performance