是否可以将具有变化变量的for循环转换为列表推导?

for i in range(10):
    n += 1
    summary += n

Is it possible to convert this for loop into a list comprehension? I tried but it didn't come out right:

summary = [sum(n+1 for i in range(10))]
评论