The import statement caches modules, meaning that if you import a more than once (even across different scripts) it will only be loaded once. Because Pythonista runs only a single Python process, this means that if you import a, modify a.py and then import a again, the changes to a won't be visible right away. In the interactive prompt, run import a, then reload(a) to reload the module from a.py, and then run your b.py again and see if it works.
If that didn't help, see if there are any other files named a.py that might be imported instead of the one you want. Pythonista doesn't come with any module named a by default, but if you have a file a.py in your Script Library or site-packages, that might be imported wrongly. If you want to find out where the module a was imported from, see a.__file__.