Why Python? And How to Run It
The language of AI, data, and automation — and why it's the most readable code you'll ever write
Python was designed to read like English. Where JavaScript has lots of punctuation ({} () => ;), Python has almost none. This makes it the best first language for understanding what code is actually saying — and the most powerful language for working with AI, data, and automation.
Python is like plain English. JavaScript is like legalese.
Both say the same things, but Python says them in plain language. JavaScript: function greet(name) { return "Hello " + name; } Python: def greet(name): return "Hello " + name. Same function, Python requires less mental parsing. When ChatGPT generates code, it usually generates Python. When data scientists share notebooks, they use Python. When ML models are published, Python is the interface.
What Python is used for
- AI and machine learning — TensorFlow, PyTorch, scikit-learn — every major AI framework has Python as its primary language. The code that powers GPT-4, Stable Diffusion, and most AI products is Python.
- Data analysis — pandas, numpy, matplotlib — data scientists use Python to clean, analyse, and visualise data. More common than Excel in most data roles.
- Automation and scripting — Rename 1,000 files, process a CSV, send emails, scrape a website — Python makes these tasks 10-line scripts instead of hours of manual work.
- Web backends — Django and FastAPI are Python web frameworks. Instagram and Pinterest started on Django.
- APIs and integrations — Stripe, Twilio, OpenAI, Anthropic — all have official Python SDKs. Claude Code is Python under the hood.
Running Python
Three ways to run Python
# 1. Install Python (python.org or brew install python)
python3 --version # Python 3.12.x
# 2. Interactive REPL — type Python, see results immediately
python3
>>> 2 + 2
4
>>> print("Hello")
Hello
>>> exit()
# 3. Run a script file
python3 my_script.py
# 4. Online (no install needed) — replit.com or python.org/console▶ Your first Python script
Create a file called hello.py
# hello.py
print("Hello, Python!")
print(2 + 2)
print("My name is " + "Python")Result
Hello, Python! 4 My name is Python
Run it
python3 hello.py
Result
The three lines printed in order
Open the REPL for quick experiments
python3
>>> "python".upper()
>>> len("python")Result
'PYTHON' 6
Try this
Install Python, open the REPL (python3), and type: import this. Press Enter. Read what you see — it's called "The Zen of Python." These 19 aphorisms describe the language's philosophy. "Readability counts" is why Python is the best beginner language.