Python的基本数据类型
Python: 的数字有 4 中数据类型:整数(int)
、浮点数(float)
、布尔值(bool)
、复数(complex)
。
打印:数据类型
>>> type (1) >>> <class 'int'> >>> type (1.0) >>> <class 'float'> >>> type ('1') >>> <class 'str'>
9**100
结果为:265613988875874769338781322035779626829233452653394495974574961739092490901302182994384699044001
100.0**100
结果为:1e+200
2/3
结果为:0.6666666666666666
1 == 1.0
结果为:True
(3+4j)*(3-4j)
结果为:(25+0j)