You are running Python as an
interactive shell. The import command process a Python file and make the methods available by executing all the lines that are not indented. This is only done once for a particular file.
You probably either want to invoke "python <your file name.py>" or import the code and invoke a method you have declared to have the Python runtime execute your program. You will also want to define which method is the main entry point for your application with this idiom: