Baking 1000 Digits of Pi from 3 Small Lines of Python

Python’s mpmath module is a powerful tool for high accuracy calculation that you should know

You likely know that integers in Python can grow to any reasonable size. For example, here’s a short Python program that starts with 1 and multiplies by 256 with each step. After 20 steps the resulting integer is larger than many programming languages can handle: