I have a question about list compressions within Python. I am learning through Udacity and uploading my answers/code to an IDE (I could be wrong about it being an IDE) they have through my browser. Before uploading I like to test my code to see if it actually works...as of now I am using Windows Powershell. So the code below is run on Powershell. But my question is...why when I run my code does it print [None, None, None, None] but when I print(new_list) I get ['a','b','c','d']
letters = ['A', 'B', 'C', 'D']
[new_list.append(letter.lower()) for letter in letters]
print(new_list)
When I upload the code to the browser I get a 'Nonetype' object is not an iterable. Makes sense... considering Powershell tells me it is initially viewed as a Nonetype. But, why?