Python supports really long integers, practically infinite, but when it comes to adding two such long integers, what Python does is something really fascinating…
Python literally does what we are taught in school. Go digit by digit and maintain a carry.
But, instead of working on decimal digits, Python stores the number in base 2^31 and adds them digit by digit. This way, it ensures an efficient utilization of the 32-bit width of regular integers.
If you are interested in digging deeper into CPython, here’s the link to the source code referencing this operation. By the way, I also have a short series on CPython internals on my YouTube channel; the link to both is in the comments.