📜  如何在python代码示例中检查整数

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

代码示例1
x = 1/3  # insert your number here
print(x - int(x) == 0)  # True if x is a whole number, False if it has decimals.