-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
The Python Workshop Second Edition - Second Edition
By :
In previous chapters, you have been executing Python Jupyter Notebooks on an interactive Python console. However, most Python code lives in text files with a .py extension. These files are simply plain text that can be edited with any text editor. Programmers typically edit these files using either a text editor such as Notepad++, or integrated development environments (IDEs) such as Jupyter or PyCharm.
Typically, standalone .py files are either called scripts or modules. A script is a file that is designed to be executed usually from the command line. On the other hand, a module is usually imported into another part of the code or an interactive shell to be executed. Note that this is not a hard distinction; modules can be executed, and scripts can be imported into other scripts/modules.
In this exercise, you will create a script called my_script.py and execute it on the command line to...