In [1]:
import math

In [2]:
print(math.floor(10.123))


10

In [3]:
print(math.floor(10.987))


10

In [4]:
print(type(math.floor(10.123)))


<class 'int'>

In [5]:
print(math.floor(10))


10

In [6]:
# print(math.floor('10'))
# TypeError: must be real number, not str

In [7]:
print(hasattr(10, '__floor__'))


True

In [8]:
print(hasattr('10', '__floor__'))


False

In [9]:
print(math.floor(-10.123))


-11

In [10]:
print(math.floor(-10.987))


-11