>>> sum(range(0,101)) 5050 或者 >>> sum(i for i in range(0,101)) 5050 转载于:https://www.cnblogs.com/sea-stream/p/10765843.html