Discuss / Python / 这样

这样

Topic source

吼kk

#1 Created at ... [Delete] [Delete and Lock User]

import itertools def pi(N): L = [2 * i + 1 for i in range(N)] ns = itertools.cycle((4,-4)) return sum(next(ns)/x for x in L)


  • 1

Reply