>>> import mymodule Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import mymodule File "C:\Users\art-a\AppData\Local\Programs\Python\Python37-32\mymodule.py", line 1 Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32 ^ SyntaxError: invalid syntax >>> I study according to the book and, at the moment, I go through the section "modules", it says there that in order to import enough of this command, even though I did everything that was said in the book, the error still comes out. The code for the imported program is:
def hello(): print ("hello world") 


Python 3.7.1linePython 3.7.1in fact not a valid python code. First put things in order in the file, and then import - andreymalmymodule.py- andreymalmymodule.pyin a normal text editor, for example, in Notepad or in WordPad - andreymal