Replaced `is not` with `not str.endswith`.
Replaced `is not` with `not str.endswith`.

Using `is` for comparing strings can fail because it checks identity rather than equality. It can work in CPython sometimes because it caches strings, but we cannot rely on it. The fix will work in other implementations as well like PyPy, Jython etc.
Instamojo/instamojo-py