str2d.Str2D.pi
- Str2D.pi()[source]
Replace the data with digits of pi. This is a wrapper around the pi function and returns a new Str2D object with the data replaced with the digits
- Returns:
A new Str2D object with the data replaced with the digits of pi.
- Return type:
Examples
Let’s create an instance of Str2D and assign it to the variable a and then
from str2d import Str2D a = Str2D('abcdef\nghijkl\nmnopqr\nstuvwx') a
abcdef ghijkl mnopqr stuvwx
a.pi()
3.1415 926535 897932 384626