Python's math module provides a high-precision value of pi. For even higher precision, external libraries like mpmath can be used.