PhpStorm (Menu Code > ReFormat Code/File)
* Reformat File has more Options as seen in the second screenshot



VS Code (Right-Click + choose: Format Document/Selection)
Format Document: For All Document but Format Selection: Only for the Selected Code


Just another WordPress site
import os
def print_hi(name):
    # Use a breakpoint in the code line below to debug your script.
    print(f'Hi, {name}')  # Press ⌘F8 to toggle the breakpoint.
def ver_Py3():
    #checking using cmd
    #python --version
    #using python script to get version
    os.system("python --version")
    os.system("python -V")
    os.system("python -VV")
/Users/leonidassavvides/PycharmProjects/pythonProject2/venv/bin/python /Users/leonidassavvides/PycharmProjects/pythonProject2/main.py
Hi, PyCharm
Python 3.10.4
Python 3.10.4
Python 3.10.4 (v3.10.4:9d38120e33, Mar 23 2022, 17:29:05) [Clang 13.0.0 (clang-1300.0.29.30)]
Process finished with exit code 0
The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit https://support.apple.com/kb/HT208050. (venv) leonidass-mbp:pythonProject2 leonidassavvides$ python --version Python 3.10.4 (venv) leonidass-mbp:pythonProject2 leonidassavvides$ python -V Python 3.10.4 (venv) leonidass-mbp:pythonProject2 leonidassavvides$ python -VV Python 3.10.4 (v3.10.4:9d38120e33, Mar 23 2022, 17:29:05) [Clang 13.0.0 (clang-1300.0.29.30)]
Here is a Python Script
If then try…
….
else try ..,
From this script flow & flowchart you can learn to debug a non working connection
EASY READ EVEN FOR NON PYTHON PROGRAMMERS
SCRIPT HERE // FLOWCHART FOLLOWS
Flowchart