Python math.pi Constant
Example
Print the value of PI:
    # Import math Library
import math 
# Print the value of pi
    print (math.pi)
  Try it Yourself »
Definition and Usage
The math.pi constant returns the value of PI: 3.141592653589793.
Note: Mathematically PI is represented by π.
Syntax
math.pi
Technical Details
| Return Value: | A float value, 3.141592653589793, representing the mathematical constant 
  PI | 
|---|---|
| Python Version: | 1.4 | 
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.