Here is three examples actually.
>>> result = []
>>> for k in range(10):
>>> result += k*k
>>> result = []
>>> for k in range(10):
>>> result.append(k*k)
>>> result = [k*k for k in range(10)]
First one makes a error. Error prints like below
TypeError: 'int' object is not iterable
However, second and third one works well.
I could not understand the difference between those three statements.