Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How many digits is the int type of python3?
How many digits is the int type of python3?
The type of int in python3 is a dynamic long integer, which theoretically supports infinite numbers. With the method of sys.getsizeof () (), we can see how much int accounts for. For example:

sys.getsizeof(0)=24

sys.getsizeof( 1)=28

So 0 accounts for 24 bytes, and other numbers generally account for 28 bytes. The above results are tested on a 64-bit operating system.

Extended data:

Int is a class in python and one of the immutable data types. Some attributes, like strings, are integers. Python int number type: integer int, long integer, Boolean bool, floating point number float, complex number.

Creating Integer int: Creating a new integer variable is the same process as assigning a value to a variable.

Characteristics of Integer: Since it is an integer, the data in assignment should naturally be an integer, which is simply understood as (positive integer minus integer).