You get an hint that Python's import is not a simple "add name to scope" when importing a builtin package opens a web browser:
import antigravity
As others have mentioned, every line of code not in a function/class gets executed when imported, except if guarded with an `if __name__ == '__main__':` (only true when executing the script with `python xxx.py`). A related catch: functions' default arguments are also evaluated when imported the first time.
Try creating `fun.py`:
Now: `python fun.py` or `python -c "import fun"`