Question: I'm trying to find if there's a way to search in lucene to say find all documents where there is at least one word that does not match a particualar word.

E.g. I want to find all documents where there is at least one word besides "test". i.e. "test" may or may not be present but there should be at least one word other than "test". Is there a way to do this in Lucene?

thanks,
Purushotham

Answer: 
Many methods of `list` and other mutable types intentionally return `None` so that there is no question in your mind as to whether you are creating a new object or mutating an existing object. The only thing that could be happening is mutation since, if a new object were created, it would have to be returned by the method, and it is not returned.

As you may have noticed, the methods of `str` that edit the string do return the new string, because strings are immutable and a new string is always returned.

There is of course nothing at all keeping you from writing a `list` subclass that has the desired behavior on `.append()` *et al,* although this seems like rather a heavy hammer to swing merely to allow you to chain method calls. Also, most Python programmers won't expect that behavior, making your code less clear.
To remove multiple mutations on lists as you want to do on your example, you can do : 

```
a = range(5)
a = [i for j, i in enumerate(a) if j not in [2, 3]]

```

a will be [0, 1, 4]