When you install python on your machine by default, it will install the python interpreter/shell, IDLE, and other required components to implement the applications using the python programming language.
The Python IDLE (Integrated Development and Learning Environment) is an integrated development environment (IDE) component to build applications using the python programming language.
The Python IDLE is a decent text editor, and it has features like code hinting, syntax highlighting, file explorers, etc. to make developer life easy during the application development.
The Python IDLE is useful for creating, modifying, and executing the script files and single statements based on our requirements.
To start Python IDLE, search for IDLE in the start menu and click on the IDLE app like as shown below.
After opening the Python IDLE interface, you will see the greater than (
>>>) symbols like as shown below, that means you are ready to start typing your code.
If you want, you can perform different operations in python idle like as shown below.
By using Python IDLE, you can create, modify, and execute script files. To create a new python script file, go to File à Select New File from the menu, as shown below.
After creating the new file, write the code as shown below and save the file with
If you observe the above image, we saved the file with a
pythonexample.py name. In the editor window, to execute the python script file, go to Run à select Run Module or press F5. The Python IDLE shell will show the result as shown below.
Like this, you can use the python IDLE editor to create, write, and execute the python programs based on your requirements.
Like Python IDLE editor, we have other popular open-source editors available to build the python applications. In the next chapter, we will learn more about it.