sorry for the beginners question but I've spent too long messing about with this so far andI'm sure it's a simple solution.
So
For the exercise I am changing this simple list comprehension back to a for loop :
numbers = [n for n in range(10)]
listcomp = [n/2 for n in numbers if n%2 == 0]
Obviously all this does is take numbers 0 to 9, divides them by 2 to give floats from 0.0 to 4.5, and then removes entries from the list whose remainders when divided by 2 are not equal to 0, leaving only the whole numbers from 0.0 to 4.0. Here is what I thought would work, the problem at the moment is that the if statement and the second append appear to have no effect and I'm not sure why. I would like to understand this problem if anyone can explain.
numbers = []
newlist = []
for num in range(0, 10):
numbers.append(num/2)
for n in numbers:
if n%2 == 0:
newlist.append