Python Numeric Types

title: Python Numeric Types

The numeric types for Python are:

  • integers (int)


print(1) print(100) print(8435367)
  • floating point numbers (float)


print(1.5) print(46.84) print(84357.435)
  • complex numbers


print(3 + 4j) print(5 + 6j) print(2j + 1)

The standard library adds numeric types for

Numeric objects are created from literals or as the result of functions and operators. The syntax for numeric literals is well documented.

Other Resources

This article needs improvement. You can help improve this article. You can also write similar articles and help the community.