How to create a Python script

1. Open your text editor of choice and create a new file.

2. Add the following line at the top of the file: #!/usr/bin/env python

3. Write your Python code in the file, using the correct syntax and indentation.

4. Save the file with a .py extension, such as

5. Make the file executable by running the following command in your terminal: chmod +x

6. Run the script by typing ./ in the terminal.