import math s=lambda i:4*math.pi*i**2 # 生成函数 l=[1,2,4,9,10,13] # 输入列表 res=[s(i) for i in l] # 推导式求值 for i in res: # 遍历输出 print('%.2f'%i)