how to import pi from math in python code example Example: pi in python math >>>import math >>> math.pi 3.141592653589793