- Python Data Structures and Algorithms
- Benjamin Baka
- 102字
- 2021-07-09 19:45:02
Numeric Types
All numeric types, apart from bool, are signed and they are all immutable. Booleans have two possible values, True and False. These values are mapped to 1 and 0, respectively. The integer type, int, represents whole numbers of unlimited range. Floating point numbers are represented by the native double precision floating point representation of the machine. Complex numbers are represented by two floating point numbers. They are assigned using the j operator to signify the imaginary part of the complex number, for example:
a = 2+3j
We can access the real and imaginary parts with a.real and a.imag, respectively.
推薦閱讀
- jQuery Mobile Web Development Essentials(Third Edition)
- VMware View Security Essentials
- ASP.NET動態網頁設計教程(第三版)
- D3.js 4.x Data Visualization(Third Edition)
- 微服務從小白到專家:Spring Cloud和Kubernetes實戰
- 持續輕量級Java EE開發:編寫可測試的代碼
- Microsoft 365 Certified Fundamentals MS-900 Exam Guide
- Getting Started with Python and Raspberry Pi
- .NET 4.5 Parallel Extensions Cookbook
- JQuery風暴:完美用戶體驗
- Python一行流:像專家一樣寫代碼
- WebStorm Essentials
- Greenplum構建實時數據倉庫實踐
- Python滲透測試編程技術:方法與實踐(第2版)
- Learning Redux