integer

A whole number with no fractional part, such as 7, 0 or -12, which Python calls int.

In more detail

Python integers can be as large as memory allows and are exact, unlike floats. Arithmetic on two ints gives an int, except true division with /, which always gives a float. int() converts a string of digits or a float, dropping any fraction, to an integer.

Example

int("42") + 1

Related terms

Taught in

References

Certification courses