📜  如何在python代码示例中检查变量的类型

📅  最后修改于: 2022-03-11 14:47:15.083000             🧑  作者: Mango

代码示例2
>>> i = 123
>>> type(i)

>>> type(i) is int
True
>>> i = 123.456
>>> type(i)

>>> type(i) is float
True