import and reload problem python
I learned the basics of Python with other resources and then decided to read Mark Lutz's book. At the second task I was asked to import file with simple code by example:Ā Ā» from imp import reloadĀ Ā» reload(script1)Ā *some code*Ā Ā»Ā And yes, I know that there's importlib instead of imp (they didn't change it to 5th edition). I actually tried to write this in different combinations but still nothing. When I do as it probably should be it goes:Ā Ā»from importlib import reloadĀ Ā»reload(script1)Ā Traceback (most recent call last):Ā File "<pyshell#1>", line 1, in <module>Ā reload(script1)Ā NameError: name 'script1' is not definedĀ I've read that it can have to do something with where the file is saved but I did it with different files even in a folder where Python IDLE and other stuff are downloaded. There's no problem with code itself.Ā I most likely don't see the answer under my nose so I would like to ask you to help me