Python supports integers, floating-point numbers and complex numbers, which are int, float, and complex classes.
Table of Contents
Convert between number data types
We can also use built-in functions like int(), float() and complex() to convert between types.
int(10.4) >> 10 float(10) >> 10.0 complex('4+6j') (4+6j)

Print float with commas as thousands separators and 2 decimals
# Python2 '{:,.2f}'.format(value) # Python3 f'{value:,.2f}' format(value, ',.2f')
Divide and get integer value
To get integer value of a division we use “//” operator. It returns floor value for both integer and floating point arguments.
7//3 #output: 2 9.0//4 #output: 2.0