a=0
b=1
class A:
a=42
b=list((a,a+1,a+2))
x=A()
print(x.b)
output: [42, 43, 44]
VS
a=0
b=1
class A:
a=42
b=list((a+i for i in range(3)))
x=A()
print(x.b)
output: [0, 1, 2]
So in the first example, a=42 was used. But in the second example, a=0 was used. Why is that so?