python算术

'''
1、对每个数进行平方,
2、求和
'''
print(sum(x ** 2 for x in range(4)))
原文地址:https://www.cnblogs.com/huay/p/10838088.html