I'm completely new to programming and eventually want to study machine learning. I'm deciding whether to start with Python or C++, but the course I'm considering is expensive, so I want to choose something that will genuinely help me. I may learn both eventually, but I'm unsure which language would give me the best starting point and whether C++ would provide a stronger foundation in programming.
3 Answers
Python is the more practical first choice for machine learning. C++ is powerful and valuable, but it can add a lot of complexity for someone who is still learning basic programming. You can always study C++ later when you have a clearer reason to use it.
You can learn both, but use them for different goals. Begin with Python so you can explore machine learning and its libraries quickly. Later, learn C++ to understand lower-level concepts such as memory, performance, and hardware-oriented programming. Projects involving microcontrollers or small computers can be a useful way to practice those ideas, but they aren’t necessary before starting ML.
Start with Python. It has the strongest machine-learning ecosystem, with widely used libraries and plenty of beginner-friendly learning resources. That lets you focus on programming and ML concepts instead of wrestling with compiler details and memory management.

I’ve heard that starting with C++ can help build a deeper understanding of programming, while others recommend jumping straight into Python. That conflicting advice is what has been confusing me.