Python is a double-edged sword for CS beginnners.
Python is a simple and concise programming language with a thriving open-source ecosystem.
This article is not to blame Python, but to clarify some misunderstandings and misusages with Python, as many CS students' first programming language is Python. I write this article to help some CS students from getting confused or stuck with Python and CS study.
When we are happy using Python's rich ecosystem of libraries, we'd better keep our curiosity to find out how these libraries work.
If learning programming is just pip install and import from as, composing functionalities of libraries together, LLM can take your place and do better.
If we know what's happening below the API of libraries, we can build stronger code and find bugs easier, which is essential for professional developers. Many powerful Python libraries, like numpy, pandas, tensorflow, is implemented by C++ on the low level. Knowing how they interact with the hardware is the first step from beginner to pro. Many Python libraries provide functionalities that seem like magic, it's interesting to find out what's actually happening.
Don't just requests.get(), try to understand a bit about HTTP, DNS and even sockets. Don't just import numpy, appreciate the linear algebra concepts it embodies. By studying what happening under the APIs, we can unlock Python's most interesting parts like decorators and interop with native code, being a better Python developer.
I have seen someone saying, "One line of code makes your Python programs 20x faster than C++!" Here is his example:
Yes, it's cool. Then beginners on programming are happy with "Python is cool and superpowered. C++ is difficult and dumb" However, this example code is unfair. It cannot prove "Python is better than C++." With similar memoization, a C++ version is no doubt faster.
The real takeaway isn't about Python vs. C++, but the power of algorithmic thinking (like memoization) which transcends any single language.
Python provides useful libraries and grammar sugar that may overshadow the real valuable underlying knowledge. They are great for productivity, but for learning computer science, my suggestion is to back to fundamentals.
While Python is strongly typed (every object has a definite type), its dynamic typing means variables, parameters and return values aren't required to have explicit type annotations at compile time. This flexibility can lead to runtime errors that are harder to trace for beginners and can make larger codebases challenging to reason about without discipline or tools like type hints. There is a joke: "When I wrote this code, only the god and I know the types in it. A week later, only the god knows."
For beginners, starting with Python is OK. But don't start with only Python itself. It's important to develop awareness on the type system, the OOP or FP methodology and the best practice in Python development.
When beginners want to run a demo, they run the app.py directly, and find a module is missing. Then they turn to LLMs, asking how to solve this problem. LLM tells them to pip install. The beginner presses Ctrl+C, Ctrl+V and Enter. In the end, the beginner runs the program successfully, but it's far from the best practice.
Developing a modern python project is different from running a snippet in REPL. It's about dependency management, API organizing and strict typing. Developers usually use uv or venv to avoid pollution to the global environment, and other tools for type checking. Without these, a python project can be an unmaintainable nightmare.
A conclusion is not needed, because it make my article too LLM-styled.