Update Generate-substitutions.py

More code simplification.  :)