This depends on `OPERATORS` having the 2-character operators before the single ones. That's scary. Someone might edit line 4 not noticing this. 
I suggest you do:
```
for operator in sorted(OPERATORS, key=lambda x:len(x), reverse=True):
```