Python 1.3 Numeric Types
此篇文章是我學習Python整理的筆記,如果有任何錯誤請留訊息給我,萬分感謝。
Numeric Types int, float, complex
Int, or integer, is a whole number, positive or negative, without decimals, of unlimited length.
Float, or “floating point number” is a number, positive or negative, containing one or more decimals.
Note: You cannot convert complex numbers into another number type.
1 | x = 1 # int |
1.0
2
(1+0j)
<class ‘float’>
<class ‘int’>
<class ‘complex’>
本部落格所有文章除特別聲明外,均採用 CC BY-NC-SA 4.0 許可協議。轉載請註明來自 Eunice's Blog!
評論



