Python笔记——整数和浮点数

判断整数和浮点数

废话不多说,直接上代码,在IDLE中运行可以得到同样的效果,有兴趣的小伙伴可以试一下。

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> 8
8
>>> print(type(8))

>>> 8.0
8.0
>>> print(type(8.0))

>>> 

你可能感兴趣的:(Python笔记——整数和浮点数)