to use pi in python just Use math.radians(). Using math.radians() you can use pi in python. It is very easy to use. Lets learn about of this by given below example:import math math.radians(90) math.radians(180) Output : 1.5707963267948966 3.141592653589793