In Python, int and long are both used to represent integers, but there are some differences in how they were handled in earlier versions of Python:
1. Python 2.x:
int: Represents fixed-precision integers (typically up to 32 or 64 bits, depending on the system).
long: Represents arbitrarily large integers, indicated by appending an “L” to the value (e.g., 12345678901234567890L).
2. Python 3.x:
The distinction between int and long was eliminated. All integer values are now handled as int objects, which can grow as large as the available memory allows, similar to how long was used in Python 2. This means that in Python 3, there’s no need for a separate long type for large integers.
Thus, in Python 3, the int type can represent both fixed and arbitrary-precision integers, and the long type no longer exists.