Session06 - Python script for trigrams 

It is considered more correct to use 'is' instead of '==' when dealing with None. So here you should say:

if new_value is None:

The reason for this has to do with there being only one None object, and all things that have a value of None pointing to this one object, so the equality is greater than a mere ==.