2
I have following code:
myList = [1,2,3,4,5]
result = []
test = [result.append(i) for i in myList]
whose output from test
is:
[None, None, None, None, None]
I’d like to know why, since ex se:
test = [print(i) for i in myList]
Print each one successfully
I don’t want the solution to this, I know in a normal cycle this works, I’d just like to know why the append
not be executed as I want