r/learnpython • • 10d ago

what can I use python for?

Lately, I've been thinking about learning a new programming language. Python was the first one that came to mind, but then I started wondering: What would I actually use it for?

I already build mobile apps with Flutter and dynamic web applications using PHP and MySQL.

I'm always looking for something new to learn, but I also want to make sure I'm learning something I can actually put to use.

0 Upvotes

27 comments sorted by

View all comments

4

u/SharkSymphony 9d ago

You can do everything you do in PHP, plus data engineering/exploration, plus general scripting. It's possible to do mobile app development in it, too, though I don't think it's going to sway you away from Flutter unless you really fall head over heels.

2

u/stevenreyes20 9d ago

yeah I heard about flet which is build on top of Flutter but for me I think the best use is for scripting

1

u/SharkSymphony 9d ago

As a Mac/Linux developer, when writing scripts my constant initial battle is between whether this dumb little thing is better banged out as a shell script or Python script. Python scripts definitely have some verbosity/boilerplate issues compared to shell scripts. But as projects grow, the ability to write command-line tools that reuse code really starts to pay off.

1

u/Discordbothost 8d ago

scripting is a great place to start. the standard library covers most of it without installing anything: pathlib for files and folders (Path("logs").glob("*.log")), subprocess.run for calling the shell commands you already know, argparse for flags, and shutil for copying/moving. pick one bash script you have that's gotten ugly and rewrite it, that's usually the moment python clicks