examples/basics/converting_to_int.py
from __future__ import print_function

print( int(2.1) )         # 2
print( int("2.1") )

#          Traceback (most recent call last):
#            File "examples/basics/converting_to_int.py", line 4, in <module>
#              print(int("2.1"))
#          ValueError: invalid literal for int() with base 10: '2.1'
examples/basics/converting_to_int_via_float.py
from __future__ import print_function

print( int( float("2.1") ))  # 2
print( int( float(2.1) ))    # 2
print( int( float("2") ))    # 2
print( int( float(2) ))      # 2