I have a weird problem, so basically when I write this:
def deletex():
s= "The quick red fox jumped over the lazy dog."
t= s.split()
for x in t:
t.remove(x)
return t
print deletex()
So I don't get nearly what I expected, it removes every other word instead of every single one.
Why?
I can get around it with appending to a different list, but I want it to work this way too, since lists are supposed to be mutable. Also I noticed when I try to do x.capitalize() it doesn't work without appending to an empty list.