Integer (int) (Python)

An integer in Python is a whole number with no decimal point, such as 5, 0, or -42. The type is called int and can hold arbitrarily large values.

Python

Unlike many languages, Python integers have no fixed size limit — they grow as large as your memory allows. Use int() to convert text or floats into integers.

Examples

Python

count = 10
big = 2 ** 100
print(count, type(count))
print(big)

Output:

10 <class 'int'>
1267650600228229401496703205376

Learn it in a lesson

See also

Back to the Dictionary