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: 
In Python, essentially all methods that mutate the object return `None`.

That's so you don't accidentally think you've got a new object as a result.

You mention

> 
> I think even PHP allows these types of subsequent mutations with Strings.
> 
> 
> 

While I don't remember about PHP, with string manipulations, you **can** chain method calls, because **strings are immutable**, so **all string methods return a new string**, since they don't (can't) change the one you call them on.

```
>>> "a{0}b".format(3).center(5).capitalize().join('ABC').swapcase()
'a A3B b A3B c'

```
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]