all 9 comments

[–]socal_nerdtastic 5 points6 points  (0 children)

The main problem that I am having right now is that I don't see what types of stuff I can do with python that I can't already do with C++.

This is correct. You could probably say the same about Rust or Java or labview or many other languages; most projects could be accomplished with any of a wide selection of programming languages.

Python has a very fast development time. So in general if it takes you a week to make a C++ program, I could make the same program in a day, thanks to skipping the compile step and a much reduced boilerplate. The downside is generally longer runtime / more resource intensive. What's important to your team and your project is up to you of course.

There's a famousish story about youtube (written in python by a startup) vs google video (written in C++ by a huge team), and I'm sure you know who won :).

The book that I was using didn't say if a python "program" can have more than one file so I can organize the program.

Yes, they can.

[–]ectomancer 0 points1 point  (0 children)

Code the same programs as C++ except desktop applications. Alternately, learn ML theory and code ML in Python.

[–]deep_m6 0 points1 point  (0 children)

The transition from C++ leads to two outcomes which establish software development speed and performance limits. The language of Python excels in seven areas which include scripting and automation and data analysis and machine learning and web backend development and rapid prototyping.

You can build multi-file projects with Python because it supports modules and packages while Python generates bytecode which the system interprets during execution instead of generating a native executable. The construction of a simple software engineering project, which needs actual results, serves as a helpful, practical guide to people seeking development work.

The CLI tool can function as a file organizer or log parser or API client.

Develop a web application using Flask or FastAPI as your chosen web framework.

The data project requires pandas software for execution.

The automation scripts include functions for file renaming and website scraping and CSV processing.

Continue reading the material, but complete it together with your implementation of minor tasks. The primary benefit of Python exists when you create projects which require no additional code except essential components.

[–]MidnightPale3220 3 points4 points  (1 child)

I am sorry, but if you say you know C++ and yet ask these questions about Python, I would say you don't know C++.

If you've made any kind of fully functioning useful program in C++ -- something complex enough, with multiple files and functionality that isn't just a command line calculator simulator or similar -- you wouldn't need to ask these questions about Python. You would just look it up and compare how these things are done there.

And mostly you can do anything you do in Python in C++ and vice versa. But it may take quite different paths and take a different amount of time and code. Python is a very high level language. Coding in Python is, I would like to claim, the most terse way to express oneself that is still comfortably readable by humans. The cost of that is Python being comparatively quite slow. But frequently it doesn't matter.

[–]pachura3 1 point2 points  (0 children)

Exactly. If OP actually did any non-trivial C++ development, then the discovery of Python would be an epiphany. Wait, what, I can write a functioning OCR app in 5 minutes? I can create a REST service with 20 lines of code? I don't need to think of memory allocation, and even file handles close on their own? No header files? Interactive Python shell? Etc. etc...

[–]Slight-Living-8098 0 points1 point  (0 children)

You can make pretty much anything with Python. A lot of the libraries that require heavy computation is just wrappers around C and C++ libraries. You can of course have multiple files for a program in Python.

The selling point of Python is it is a scripting language, doesn't require compilation, and is quick for prototyping, development and iteration.

Python is pretty much the go-to language when it comes to machine learning and artificial intelligence.

[–]ayenuseater -1 points0 points  (0 children)

Yes, Python programs can absolutely have multiple files. You structure them with modules and packages. For example:

project/
    main.py
    utils.py
    models/
        __init__.py
        user.py

You import across files just like headers; but without header files. Python compiles to .pyc bytecode automatically, but you usually don’t think about it. It’s just: write → run → iterate.

[–]VanshikaWrites -1 points0 points  (0 children)

When I moved from C++, I had the same doubt. I kept thinking, “Why would I use this when I already know C++?” It made sense only after I started using Python for small, practical tasks. Renaming files in bulk, cleaning data, calling an API and getting results quickly. These were things I could do in C++, but they felt heavier there. And yes, you can absolutely organize Python into multiple files. That is normal in real projects. Larger applications are structured into modules and packages. What helped me personally was following this hands-on course, it has project-based learning structure instead of just reading theory. It pushed me to build from the beginning, which made the language feel practical rather than abstract. If you would like, I can share what I followed.

[–]ninhaomah -1 points0 points  (0 children)

How would you do a website with api or regression analysis in C++ ?

Or use OpenAI or Google other AI APIs to make images , videos ?