def getPiLambert ( n ) : mypi = piGenLambert ( ) result = [ ] if n > 0 : result += [ next ( mypi ) for i in range ( n ) ] mypi . close ( ) return result
how to generate the numbers of pi using python
Returns a list containing first n digits of Pi
def getPiLambert(n):
    """Returns a list containing first n digits of Pi
    """
    mypi = piGenLambert()
    result = []
    if n > 0:
        result += [next(mypi) for i in range(n)]
    mypi.close()
    return result